WLJS LogoWLJS Notebook

Exception

Exception[spec]
Exception[spec, payload]

creates an exception object from a string or symbolic type specification. The optional payload can be any expression and is commonly an association containing error details.

Examples

Exception["DataConsistencyError"]

Attach structured information:

Exception[
  "DataConsistencyError",
  <|"Data" -> 42, "Source" -> "import"|>
]

Use ExceptionQ to validate an exception object.

See the official Wolfram Language reference for supported specifications and properties.

On this page