ExceptionTypeRegisteredQ[sym,tag]
gives True for symbol sym registered as a subtype of exception type tag, and False otherwise.
ExceptionTypeRegisteredQ[sym,{tag1,tag2,…}]
gives True for symbol sym registered as a subtype of any of the tag1, tag2, …, and False otherwise.
ExceptionTypeRegisteredQ
ExceptionTypeRegisteredQ[sym,tag]
gives True for symbol sym registered as a subtype of exception type tag, and False otherwise.
ExceptionTypeRegisteredQ[sym,{tag1,tag2,…}]
gives True for symbol sym registered as a subtype of any of the tag1, tag2, …, and False otherwise.
Details
- The parent types in the second argument of ExceptionTypeRegisteredQ must be any valid exception types (strings or symbols). They are not required to be registered exception types.
- ExceptionTypeRegisteredQ[sym,tagspec] will also return True when types in tagspec are some ancestors of sym, not necessarily direct parent types.
Examples
open all close allBasic Examples (1)
This registers the type ConversionError as a subtype of "GeneralError":
RegisterExceptionType[TypeConversionError, "GeneralError"]This checks whether the symbols TypeConversionError and tag have been registered:
ExceptionTypeRegisteredQ /@ {TypeConversionError, tag}The symbol does not need to be registered to be used as a tag, so you can create Exception objects from either of these types:
Exception /@ {TypeConversionError, tag}This deregisters the type TypeConversionError:
Unprotect[TypeConversionError];
DeleteObject[TypeConversionError]Scope (1)
This registers DatabaseError and DatabaseTypeError types, creating exception type hierarchy:
RegisterExceptionType[DatabaseError, "GeneralError"]
RegisterExceptionType[DatabaseTypeError, DatabaseError]This confirms that DatabaseError and DatabaseTypeError are registered exception types, whereas "GeneralError" is a valid, but not registered, exception type:
ExceptionTypeRegisteredQ /@ {DatabaseError, DatabaseTypeError, "GeneralError"}This checks that DatabaseTypeError is a subtype of DatabaseError, and also a subtype of one of {"GeneralError","SomeOtherError"}:
{ExceptionTypeRegisteredQ[DatabaseTypeError, DatabaseError],
ExceptionTypeRegisteredQ[DatabaseTypeError, {"GeneralError", "SomeOtherError"}]}This deregisters the DatabaseError and DatabaseTypeError types:
Unprotect[DatabaseError, DatabaseTypeError];
DeleteObject /@ {DatabaseTypeError, DatabaseError}Tech Notes
Related Guides
History
Text
Wolfram Research (2026), ExceptionTypeRegisteredQ, Wolfram Language function, https://reference.wolfram.com/language/ref/ExceptionTypeRegisteredQ.html.
CMS
Wolfram Language. 2026. "ExceptionTypeRegisteredQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ExceptionTypeRegisteredQ.html.
APA
Wolfram Language. (2026). ExceptionTypeRegisteredQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ExceptionTypeRegisteredQ.html
BibTeX
@misc{reference.wolfram_2026_exceptiontyperegisteredq, author="Wolfram Research", title="{ExceptionTypeRegisteredQ}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/ExceptionTypeRegisteredQ.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_exceptiontyperegisteredq, organization={Wolfram Research}, title={ExceptionTypeRegisteredQ}, year={2026}, url={https://reference.wolfram.com/language/ref/ExceptionTypeRegisteredQ.html}, note=[Accessed: 12-June-2026]}