Enum leo_errors::errors::LeoError
source · pub enum LeoError {
AstError(AstError),
CliError(CliError),
CompilerError(CompilerError),
InputError(InputError),
PackageError(PackageError),
ParserError(ParserError),
TypeCheckerError(TypeCheckerError),
FlattenError(FlattenError),
LastErrorCode(i32),
Anyhow(Error),
}Expand description
The LeoError type that contains all sub error types. This allows a unified error type throughout the Leo crates.
Variants§
AstError(AstError)
Represents an AST Error in a Leo Error.
CliError(CliError)
Represents an CLI Error in a Leo Error.
CompilerError(CompilerError)
Represents an Compiler Error in a Leo Error.
InputError(InputError)
Represents an Input Error in a Leo Error.
PackageError(PackageError)
Represents an Package Error in a Leo Error.
ParserError(ParserError)
Represents an Parser Error in a Leo Error.
TypeCheckerError(TypeCheckerError)
Represents a Type Checker Error in a Leo Error.
FlattenError(FlattenError)
Represents a Flatten Error in a Leo Error.
LastErrorCode(i32)
Purely for just exiting with the correct status code and not re-displaying an error.
Anyhow(Error)
Anyhow errors.
Implementations§
Trait Implementations§
source§impl Error for LeoError
impl Error for LeoError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<CompilerError> for LeoError
impl From<CompilerError> for LeoError
source§fn from(source: CompilerError) -> Self
fn from(source: CompilerError) -> Self
Converts to this type from the input type.
source§impl From<FlattenError> for LeoError
impl From<FlattenError> for LeoError
source§fn from(source: FlattenError) -> Self
fn from(source: FlattenError) -> Self
Converts to this type from the input type.
source§impl From<InputError> for LeoError
impl From<InputError> for LeoError
source§fn from(source: InputError) -> Self
fn from(source: InputError) -> Self
Converts to this type from the input type.
source§impl From<PackageError> for LeoError
impl From<PackageError> for LeoError
source§fn from(source: PackageError) -> Self
fn from(source: PackageError) -> Self
Converts to this type from the input type.
source§impl From<ParserError> for LeoError
impl From<ParserError> for LeoError
source§fn from(source: ParserError) -> Self
fn from(source: ParserError) -> Self
Converts to this type from the input type.
source§impl From<TypeCheckerError> for LeoError
impl From<TypeCheckerError> for LeoError
source§fn from(source: TypeCheckerError) -> Self
fn from(source: TypeCheckerError) -> Self
Converts to this type from the input type.