Struct leo_errors::common::backtraced::Backtraced
source · pub struct Backtraced {
pub message: String,
pub help: Option<String>,
pub code: i32,
pub code_identifier: i8,
pub type_: String,
pub error: bool,
pub backtrace: Backtrace,
}Expand description
Backtraced compiler ouput type
undefined value x
–> file.leo: 2:8
= help: Initialize a variable x first.
Fields
message: StringThe error message.
help: Option<String>The error help message if it exists.
code: i32The error exit code.
code_identifier: i8The error leading digits identifier.
type_: StringThe characters representing the type of error.
error: boolIs this Backtrace a warning or error?
backtrace: BacktraceThe backtrace representing where the error occured in Leo.
Implementations
sourceimpl Backtraced
impl Backtraced
sourcepub fn new_from_backtrace<S>(
message: S,
help: Option<String>,
code: i32,
code_identifier: i8,
type_: String,
error: bool,
backtrace: Backtrace
) -> Selfwhere
S: ToString,
pub fn new_from_backtrace<S>(
message: S,
help: Option<String>,
code: i32,
code_identifier: i8,
type_: String,
error: bool,
backtrace: Backtrace
) -> Selfwhere
S: ToString,
Creates a backtraced error from a backtrace.
sourcepub fn error_code(&self) -> String
pub fn error_code(&self) -> String
Gets a unique error identifier.
sourcepub fn warning_code(&self) -> String
pub fn warning_code(&self) -> String
Gets a unique warning identifier.
Trait Implementations
sourceimpl Clone for Backtraced
impl Clone for Backtraced
sourceimpl Debug for Backtraced
impl Debug for Backtraced
sourceimpl Default for Backtraced
impl Default for Backtraced
sourceimpl Display for Backtraced
impl Display for Backtraced
sourceimpl Error for Backtraced
impl Error for Backtraced
sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourceimpl From<Backtraced> for AstError
impl From<Backtraced> for AstError
sourcefn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
sourceimpl From<Backtraced> for CliError
impl From<Backtraced> for CliError
sourcefn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
sourceimpl From<Backtraced> for CompilerError
impl From<Backtraced> for CompilerError
sourcefn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
sourceimpl From<Backtraced> for FlattenError
impl From<Backtraced> for FlattenError
sourcefn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
sourceimpl From<Backtraced> for InputError
impl From<Backtraced> for InputError
sourcefn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
sourceimpl From<Backtraced> for PackageError
impl From<Backtraced> for PackageError
sourcefn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
sourceimpl From<Backtraced> for ParserError
impl From<Backtraced> for ParserError
sourcefn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
sourceimpl From<Backtraced> for ParserWarning
impl From<Backtraced> for ParserWarning
sourcefn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
sourceimpl From<Backtraced> for TypeCheckerError
impl From<Backtraced> for TypeCheckerError
sourcefn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
sourceimpl Hash for Backtraced
impl Hash for Backtraced
sourceimpl PartialEq<Backtraced> for Backtraced
impl PartialEq<Backtraced> for Backtraced
Auto Trait Implementations
impl RefUnwindSafe for Backtraced
impl Send for Backtraced
impl Sync for Backtraced
impl Unpin for Backtraced
impl UnwindSafe for Backtraced
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more