[]Struct sentry_rocket::Error

pub struct 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]

Deprecated since 0.1.2:

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]

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]

Deprecated since 0.1.2:

please use the 'find_root_cause()' method instead

Deprecated alias to find_root_cause.

pub fn causes(&self) -> Causes[src]

Deprecated since 0.1.2:

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

type Target = Error

The resulting type after dereferencing.

impl Debug for Error

impl<'r> Responder<'r> for Error[src]

Auto Trait Implementations

impl Send for Error

impl Sync for Error

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> IntoCollection for T

impl<T, I> AsResult for T where
    I: Input,