pub struct EzError { /* private fields */ }Expand description
Stores information about the error and is used for proper error output to the Unity console.
Implementations§
Source§impl EzError
impl EzError
Sourcepub fn message(msg: &str) -> EzError
pub fn message(msg: &str) -> EzError
Constructs a new EzError with the type ErrorType::Message
using the specified message.
Sourcepub fn custom(code: u32, name: String, message: String) -> EzError
pub fn custom(code: u32, name: String, message: String) -> EzError
Constructs a new EzError with the type ErrorType::Custom.
The code can be used to store arbitrary extra information.
Sourcepub fn add_frame(&mut self, loc: &'static ConstLocation)
pub fn add_frame(&mut self, loc: &'static ConstLocation)
Adds a new frame to the EzError and sets file_name
to file and line_number to line.
Sourcepub fn with(self, other: EzError) -> Self
pub fn with(self, other: EzError) -> Self
Merges the other error into this by adding the frames of it to this.
Sourcepub fn frames(&self) -> &[&'static ConstLocation]
pub fn frames(&self) -> &[&'static ConstLocation]
Returns the stack frames of the error.
Trait Implementations§
impl StructuralPartialEq for EzError
Auto Trait Implementations§
impl Freeze for EzError
impl RefUnwindSafe for EzError
impl Send for EzError
impl Sync for EzError
impl Unpin for EzError
impl UnwindSafe for EzError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more