Enum rquickjs_core::Error [−][src]
pub enum Error {
Allocation,
InvalidString(NulError),
Utf8(Utf8Error),
Io(IoError),
Exception {
message: StdString,
file: StdString,
line: i32,
stack: StdString,
},
FromJs {
from: &'static str,
to: &'static str,
message: Option<StdString>,
},
IntoJs {
from: &'static str,
to: &'static str,
message: Option<StdString>,
},
NumArgs {
expected: Range<usize>,
given: usize,
},
Resolving {
base: StdString,
name: StdString,
message: Option<StdString>,
},
Loading {
name: StdString,
message: Option<StdString>,
},
Unknown,
}
Expand description
Error type of the library.
Variants
Allocation
Could not allocate memory This is generally only triggered when out of memory.
InvalidString(NulError)
Tuple Fields
0: NulError
Found a string with a internal null byte while converting to C string.
Utf8(Utf8Error)
Tuple Fields
0: Utf8Error
String from rquickjs was not UTF-8
Io(IoError)
Tuple Fields
0: IoError
An io error
Exception
An exception raised by quickjs itself.
FromJs
Error converting from javascript to a rust type.
IntoJs
Error converting to javascript from a rust type.
NumArgs
Error matching of function arguments
Resolving
Error when resolving js module
Loading
Error when loading js module
Unknown
An error from quickjs from which the specifics are unknown. Should eventually be removed as development progresses.
Implementations
Create resolving error
Create resolving error with message
Returns whether the error is a resolving error
Create loading error
Create loading error
Returns whether the error is a loading error
Returns whether the error is a quickjs generated exception.
Create from JS conversion error
Create from JS conversion error with message
Create into JS conversion error
Create into JS conversion error with message
Returns whether the error is a from JS conversion error
Returns whether the error is a from JS to JS type conversion error
Returns whether the error is an into JS conversion error
Create function args mismatch error
Return whether the error is an function args mismatch error
Trait Implementations
Performs the conversion.