[−]Struct sentry_rocket::Error
Just use this type as return error type for your handler functions (ex: Result<String, custom_derive::Error>
)
and after running the usual let _guard = sentry::init(...);
and it will send any error to sentry.
Note that you should use the failure
crate to propagate your errors if you wish to have proper backtrace handling.
Also, using sentry_rocket::sentry
instead of sentry
will ensure the versions match so that everything works properly
(also, then you don't need sentry
as a dependency for your project, only sentry_rocket
)
Methods from Deref<Target = Error>
pub fn as_fail(&self) -> &(dyn Fail + 'static)
[src]
Return a reference to the underlying failure that this Error
contains.
pub fn name(&self) -> Option<&str>
[src]
Returns the name of the underlying fail.
pub fn cause(&self) -> &(dyn Fail + 'static)
[src]
please use 'as_fail()' method instead
Returns a reference to the underlying cause of this Error
. Unlike the
method on Fail
, this does not return an Option
. The Error
type
always has an underlying failure.
This method has been deprecated in favor of the [Error::as_fail] method, which does the same thing.
pub fn backtrace(&self) -> &Backtrace
[src]
Gets a reference to the Backtrace
for this Error
.
If the failure this wrapped carried a backtrace, that backtrace will
be returned. Otherwise, the backtrace will have been constructed at
the point that failure was cast into the Error
type.
pub fn find_root_cause(&self) -> &(dyn Fail + 'static)
[src]
Returns the "root cause" of this error - the last value in the
cause chain which does not return an underlying cause
.
pub fn iter_causes(&self) -> Causes
[src]
Returns a iterator over the causes of this error with the cause
of the fail as the first item and the root_cause
as the final item.
Use iter_chain
to also include the fail of this error itself.
pub fn iter_chain(&self) -> Causes
[src]
Returns a iterator over all fails up the chain from the current
as the first item up to the root_cause
as the final item.
This means that the chain also includes the fail itself which
means that it does not start with cause
. To skip the outermost
fail use iter_causes
instead.
pub fn downcast_ref<T>(&self) -> Option<&T> where
T: Fail,
[src]
T: Fail,
Attempts to downcast this Error
to a particular Fail
type by
reference.
If the underlying error is not of type T
, this will return None
.
pub fn root_cause(&self) -> &(dyn Fail + 'static)
[src]
please use the 'find_root_cause()' method instead
Deprecated alias to find_root_cause
.
pub fn causes(&self) -> Causes
[src]
please use the 'iter_chain()' method instead
Deprecated alias to iter_causes
.
Trait Implementations
impl From<Error> for Error
impl From<Error> for Error
impl Deref for Error
impl Debug for Error
impl<'r> Responder<'r> for Error
[src]
fn respond_to(self, req: &Request) -> Result<'r>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Erased for T
impl<T> Same for T
type Output = T
Should always be Self
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> IntoCollection for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T, I> AsResult for T where
I: Input,
I: Input,