Crates.io | sentry-failure |
lib.rs | sentry-failure |
version | 0.21.0 |
source | src |
created_at | 2020-06-18 13:47:40.45319 |
updated_at | 2020-11-12 13:43:20.889387 |
description | Sentry integration for failure crate. |
homepage | https://sentry.io/welcome/ |
repository | https://github.com/getsentry/sentry-rust |
max_upload_size | |
id | 255338 |
size | 9,881 |
Adds support for capturing Sentry errors from failure
types.
Failure errors and Fail
objects can be logged with the failure integration.
This works really well if you use the failure::Error
type or if you have
failure::Fail
objects that use the failure context internally to gain a
backtrace.
use sentry_failure::capture_error;
let result = match function_that_might_fail() {
Ok(result) => result,
Err(err) => {
capture_error(&err);
return Err(err);
}
};
To capture fails and not errors use capture_fail
.
License: Apache-2.0