WLJS LogoWLJS Notebook

RegisterExceptionType

RegisterExceptionType[sym]
RegisterExceptionType[sym, parent]
RegisterExceptionType[sym, {parent1, parent2, ...}]

registers sym as a symbolic exception type, optionally declaring one or more parent exception types.

Example

RegisterExceptionType[FileReadError, "IOError"];

ExceptionTypeRegisteredQ[FileReadError]
ExceptionTypes["IOError"]

Registration clears prior definitions on sym and protects it. Register only symbols intended to serve as exception types.

See the official Wolfram Language reference for registration and deregistration details.

On this page