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

#1620 in Rust patterns

Download history 28/week @ 2024-03-10 19/week @ 2024-03-17 1/week @ 2024-03-24 37/week @ 2024-03-31 13/week @ 2024-04-07 5/week @ 2024-04-14 11/week @ 2024-04-21 1/week @ 2024-04-28 6/week @ 2024-05-05 17/week @ 2024-05-12 9/week @ 2024-05-19 13/week @ 2024-05-26 29/week @ 2024-06-02 19/week @ 2024-06-09 14/week @ 2024-06-16 11/week @ 2024-06-23

75 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–11MB
~236K SLoC