Module mozjs::error

source ·
Expand description

Functions to throw JavaScript exceptions from Rust.

Statics

Functions

  • Callback used to throw javascript errors. See throw_js_error for info about error_number.
  • 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 a RangeError with the given message.
  • Throw a TypeError with the given message.