pub struct Error { /* private fields */ }Expand description
Represents an error that occurred during Tulisp evaluation.
Use format to produce a formatted representation of the error including backtraces and source code spans.
Implementations§
Source§impl Error
Constructors for Error.
impl Error
Constructors for Error.
Sourcepub fn invalid_argument(desc: impl Into<String>) -> Error
pub fn invalid_argument(desc: impl Into<String>) -> Error
Creates a new Error with the InvalidArgument kind and the given description.
Sourcepub fn lisp_error(desc: impl Into<String>) -> Error
pub fn lisp_error(desc: impl Into<String>) -> Error
Creates a new Error with the LispError kind and the given description.
Sourcepub fn not_implemented(desc: impl Into<String>) -> Error
pub fn not_implemented(desc: impl Into<String>) -> Error
Creates a new Error with the NotImplemented kind and the given description.
Sourcepub fn out_of_range(desc: impl Into<String>) -> Error
pub fn out_of_range(desc: impl Into<String>) -> Error
Creates a new Error with the OutOfRange kind and the given description.
Source§impl Error
impl Error
Sourcepub fn throw(tag: TulispObject, value: TulispObject) -> Self
pub fn throw(tag: TulispObject, value: TulispObject) -> Self
Creates a new Throw error with the given tag and value.
Sourcepub fn format(&self, ctx: &TulispContext) -> String
pub fn format(&self, ctx: &TulispContext) -> String
Formats the error into a human-readable string, including backtrace information.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl !Send for Error
impl !Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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