pub enum Error {
Show 13 variants
Compile(LanguageError),
Runtime(LanguageError),
TooManyGlobals,
TooManyFunctions,
TooManyMethods,
TooManyArguments,
TooManyTraits,
TooManyParametersInTraitMethod,
TypeMismatch {
expected: Cow<'static, str>,
got: Cow<'static, str>,
},
ArgumentCount {
expected: usize,
got: usize,
},
ArgumentTypeMismatch {
index: usize,
expected: Cow<'static, str>,
got: Cow<'static, str>,
},
ReentrantMutableBorrow,
User(Box<dyn Error>),
}
Expand description
An error.
Variants§
Compile(LanguageError)
An error occured during compilation.
Runtime(LanguageError)
An error occured during runtime.
TooManyGlobals
There are too many globals.
TooManyFunctions
Too many functions were created.
TooManyMethods
Too many methods with different signatures were declared.
TooManyArguments
Too many arguments were passed to a method or a function.
TooManyTraits
Too many traits were created.
TooManyParametersInTraitMethod
A trait method with too many parameters was created.
TypeMismatch
Fields
A type mismatch occured.
ArgumentCount
Fields
Incorrect amount of arguments passed to a function.
ArgumentTypeMismatch
Fields
A type mismatch occured in function arguments.
ReentrantMutableBorrow
A value was mutably borrowed twice.
User(Box<dyn Error>)
A user-defined error.
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · 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<LanguageError> for Error
impl From<LanguageError> for Error
source§fn from(error: LanguageError) -> Self
fn from(error: LanguageError) -> Self
Converts to this type from the input type.