Skip to content

throw

Throw a previously-constructed exception.

throw(ME)

Aborts execution and propagates the exception object ME. Equivalent to error(ME.identifier, ME.message) but preserves the full exception structure for catch blocks to inspect.

ME = MException('MyApp:bad', 'oops'); throw(ME)
  • MException — Construct an exception object.
  • error — Throw an error.
  • addCause — Attach a cause exception to a base exception.