[−][src]Module sentry::integrations::failure
Adds support for the failure crate.
Feature: with_failure
(enabled by default)
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.
Example
use sentry::integrations::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
.
Traits
FailureHubExt | Hub extension methods for working with failure. |
FailureResultExt | Extension trait providing methods to unwrap a result, preserving backtraces from the underlying error in the event of a panic. |
Functions
capture_error | Captures a boxed failure ( |
capture_fail | Captures a |
event_from_error | Helper function to create an event from a |
event_from_fail | Helper function to create an event from a |
exception_from_single_fail | This converts a single fail instance into an exception. |