5 unstable releases

0.21.0 Nov 12, 2020
0.20.1 Sep 15, 2020
0.20.0 Sep 9, 2020
0.19.1 Aug 28, 2020
0.19.0 Jun 18, 2020

#11 in #error-chain

45 downloads per month

Apache-2.0

245KB
4.5K SLoC

Sentry Rust SDK: sentry-error-chain

Adds support for the error-chain crate.

Errors created by the error-chain crate can be logged with the error_chain integration.

Example

use sentry_error_chain::{capture_error_chain, ErrorChainIntegration};
let _sentry =
    sentry::init(sentry::ClientOptions::default().add_integration(ErrorChainIntegration));
let result = match function_that_might_fail() {
    Ok(result) => result,
    Err(err) => {
        capture_error_chain(&err);
        return Err(err);
    }
};

Resources

License: Apache-2.0


lib.rs:

Adds support for the error-chain crate.

Errors created by the error-chain crate can be logged with the error_chain integration.

Example

use sentry_error_chain::{capture_error_chain, ErrorChainIntegration};
let _sentry =
    sentry::init(sentry::ClientOptions::default().add_integration(ErrorChainIntegration));
let result = match function_that_might_fail() {
    Ok(result) => result,
    Err(err) => {
        capture_error_chain(&err);
        return Err(err);
    }
};

Dependencies

~8–16MB
~216K SLoC