returns a list of all registered exception types.
ExceptionTypes[tagspec]
returns a list of all registered exception types that are subtypes of the type(s) specified in tagspec.
ExceptionTypes
returns a list of all registered exception types.
ExceptionTypes[tagspec]
returns a list of all registered exception types that are subtypes of the type(s) specified in tagspec.
Details
- ExceptionTypes[All] is equivalent to ExceptionTypes[].
- The specification tagspec can be one of the following:
-
tag a single valid exception type (symbol or string) {tag1,tag2,…} a list of valid exception types - Parent exception types in tagspec are not required to be registered themselves.
- Registered exception types in the tagspec will be included in the result.
Examples
Basic Examples (2)
This returns all currently registered exception types:
ExceptionTypes[]This registers three subtypes of a single exception type "GeneralError":
RegisterExceptionType[ArgumentError, "GeneralError"]
RegisterExceptionType[IOError, "GeneralError"]
RegisterExceptionType[ArgumentTypeError, ArgumentError]Check that the newly registered types are in the type registry now:
ExceptionTypes[]Get the registered types that are subtypes of ArgumentError (including itself)
ExceptionTypes[ArgumentError]Unprotect[ArgumentError, IOError, ArgumentTypeError]
DeleteObject /@ {ArgumentTypeError, ArgumentError, IOError}Tech Notes
Related Guides
History
Text
Wolfram Research (2026), ExceptionTypes, Wolfram Language function, https://reference.wolfram.com/language/ref/ExceptionTypes.html.
CMS
Wolfram Language. 2026. "ExceptionTypes." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ExceptionTypes.html.
APA
Wolfram Language. (2026). ExceptionTypes. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ExceptionTypes.html
BibTeX
@misc{reference.wolfram_2026_exceptiontypes, author="Wolfram Research", title="{ExceptionTypes}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/ExceptionTypes.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_exceptiontypes, organization={Wolfram Research}, title={ExceptionTypes}, year={2026}, url={https://reference.wolfram.com/language/ref/ExceptionTypes.html}, note=[Accessed: 12-June-2026]}