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 output type
undefined value x
–> file.leo: 2:8
= help: Initialize a variable x
first.
Fields§
§message: String
The error message.
help: Option<String>
The error help message if it exists.
code: i32
The error exit code.
code_identifier: i8
The error leading digits identifier.
type_: String
The characters representing the type of error.
error: bool
Is this Backtrace a warning or error?
backtrace: Backtrace
The backtrace representing where the error occurred in Leo.
Implementations§
Source§impl 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§
Source§impl Clone for Backtraced
impl Clone for Backtraced
Source§impl Debug for Backtraced
impl Debug for Backtraced
Source§impl Default for Backtraced
impl Default for Backtraced
Source§impl Display for Backtraced
impl Display for Backtraced
Source§impl Error for Backtraced
impl Error for Backtraced
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
Source§impl From<Backtraced> for AstError
impl From<Backtraced> for AstError
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl From<Backtraced> for CliError
impl From<Backtraced> for CliError
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl From<Backtraced> for CompilerError
impl From<Backtraced> for CompilerError
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl From<Backtraced> for FlattenError
impl From<Backtraced> for FlattenError
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl From<Backtraced> for LoopUnrollerError
impl From<Backtraced> for LoopUnrollerError
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl From<Backtraced> for PackageError
impl From<Backtraced> for PackageError
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl From<Backtraced> for ParserError
impl From<Backtraced> for ParserError
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl From<Backtraced> for ParserWarning
impl From<Backtraced> for ParserWarning
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl From<Backtraced> for StaticAnalyzerError
impl From<Backtraced> for StaticAnalyzerError
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl From<Backtraced> for StaticAnalyzerWarning
impl From<Backtraced> for StaticAnalyzerWarning
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl From<Backtraced> for TypeCheckerError
impl From<Backtraced> for TypeCheckerError
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl From<Backtraced> for TypeCheckerWarning
impl From<Backtraced> for TypeCheckerWarning
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl From<Backtraced> for UtilError
impl From<Backtraced> for UtilError
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl Hash for Backtraced
impl Hash for Backtraced
Source§impl PartialEq for Backtraced
impl PartialEq for Backtraced
Auto Trait Implementations§
impl Freeze for Backtraced
impl RefUnwindSafe for Backtraced
impl Send for Backtraced
impl Sync for Backtraced
impl Unpin for Backtraced
impl UnwindSafe for Backtraced
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more