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

#1606 in Rust patterns

Download history 6/week @ 2023-11-27 8/week @ 2023-12-04 27/week @ 2023-12-11 1/week @ 2023-12-18 74/week @ 2024-01-01 470/week @ 2024-01-08 240/week @ 2024-01-15 10/week @ 2024-01-22 6/week @ 2024-02-05 17/week @ 2024-02-26 8/week @ 2024-03-04 29/week @ 2024-03-11

54 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
~246K SLoC