Expand description
Functions to throw JavaScript exceptions from Rust.
Staticsยง
- ERROR_
FORMAT_ ๐STRING_ STRING - Format string used to throw javascript errors.
- RANGE_
ERROR_ ๐FORMAT_ STRING - Format string struct used to throw
RangeError
s. - TYPE_
ERROR_ ๐FORMAT_ STRING - Format string struct used to throw
TypeError
s.
Functionsยง
- get_
error_ ๐ โmessage - Callback used to throw javascript errors. See throw_js_error for info about error_number.
- throw_
internal_ โerror - Throw an
InternalError
with the given message. - throw_
js_ ๐ โerror - Helper fn to throw a javascript error with the given message and number. Reuse the jsapi error codes to distinguish the error_number passed back to the get_error_message callback. c_uint is u32, so this cast is safe, as is casting to/from i32 from there.
- throw_
range_ โerror - Throw a
RangeError
with the given message. - throw_
type_ โerror - Throw a
TypeError
with the given message.