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

#1616 in Rust patterns

Download history 22/week @ 2023-12-15 34/week @ 2023-12-29 390/week @ 2024-01-05 294/week @ 2024-01-12 75/week @ 2024-01-19 1/week @ 2024-01-26 6/week @ 2024-02-02 12/week @ 2024-02-23 10/week @ 2024-03-01 22/week @ 2024-03-08 23/week @ 2024-03-15 5/week @ 2024-03-22 68/week @ 2024-03-29

119 downloads per month

Apache-2.0

235KB
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–12MB
~248K SLoC