[−][src]Trait ducc::RuntimeError
A Rust error that can be transformed into a JavaScript error.
Provided methods
fn code(&self) -> RuntimeErrorCode
The prototypical JavaScript error code.
By default, this method returns RuntimeErrorCode::Error
.
fn name(&self) -> String
The name of the error corresponding to the JavaScript error's name
property.
By default, this method returns the string name corresponding to this object's code()
return value.
fn message(&self) -> Option<String>
An optional message that is set on the JavaScript error's message
property. This is
automatically appended to the parent Error
's context
field.
By default, this method returns None
.
Methods
impl dyn RuntimeError
[src]
pub fn downcast_ref<T: RuntimeError + 'static>(&self) -> Option<&T>
[src]
Attempts to downcast this failure to a concrete type by reference.
If the underlying error is not of type T
, this will return None
.