Crates.io | sentry-error-chain |
lib.rs | sentry-error-chain |
version | 0.21.0 |
source | src |
created_at | 2020-06-18 13:47:39.548018 |
updated_at | 2020-11-12 13:43:20.288966 |
description | Sentry integration that allows capturing error-chain errors. |
homepage | https://sentry.io/welcome/ |
repository | https://github.com/getsentry/sentry-rust |
max_upload_size | |
id | 255337 |
size | 6,430 |
Adds support for the error-chain crate.
Errors created by the error-chain
crate can be logged with the
error_chain
integration.
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);
}
};
License: Apache-2.0