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
Could not allocate memory This is generally only triggered when out of memory.
InvalidString(NulError)
Found a string with a internal null byte while converting to C string.
Tuple Fields of InvalidString
0: NulError
Utf8(Utf8Error)
String from rquickjs was not UTF-8
Tuple Fields of Utf8
0: Utf8Error
Io(IoError)
An io error
Tuple Fields of Io
0: IoError
An exception raised by quickjs itself.
Error converting from javascript to a rust type.
Error converting to javascript from a rust type.
Error matching of function arguments
loader
only.Error when resolving js module
loader
only.Error when loading js module
An error from quickjs from which the specifics are unknown. Should eventually be removed as development progresses.
Implementations
This is supported on crate feature loader
only.
loader
only.Create resolving error
pub fn new_resolving_message<B, N, M>(base: B, name: N, msg: M) -> Self where
StdString: From<B> + From<N> + From<M>,
This is supported on crate feature loader
only.
pub fn new_resolving_message<B, N, M>(base: B, name: N, msg: M) -> Self where
StdString: From<B> + From<N> + From<M>,
loader
only.Create resolving error with message
This is supported on crate feature loader
only.
loader
only.Returns whether the error is a resolving error
This is supported on crate feature loader
only.
loader
only.Create loading error
This is supported on crate feature loader
only.
loader
only.Create loading error
This is supported on crate feature loader
only.
loader
only.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.