View source code
Display the source code in core/exception.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Module core.exception

The exception module defines all system-level exceptions and provides a mechanism to alter system-level error handling.

Functions

NameDescription
_d_arraybounds(file, line) These functions must be defined for any D program linked against this library.
_d_arrayboundsp(file, line) These functions must be defined for any D program linked against this library.
_d_assert(file, line) These functions must be defined for any D program linked against this library.
_d_assert_msg(msg, file, line) These functions must be defined for any D program linked against this library.
_d_assertp(file, line) These functions must be defined for any D program linked against this library.
_d_unittest(file, line) These functions must be defined for any D program linked against this library.
_d_unittest_msg(msg, file, line) These functions must be defined for any D program linked against this library.
_d_unittestp(file, line) These functions must be defined for any D program linked against this library.
assertHandler(, , ) Gets/sets assert hander. null means the default handler is used.
onAssertError(file, line) A callback for assert errors in D. The user-supplied assert handler will be called if one has been supplied, otherwise an AssertError will be thrown.
onAssertErrorMsg(file, line, msg) A callback for assert errors in D. The user-supplied assert handler will be called if one has been supplied, otherwise an AssertError will be thrown.
onFinalizeError(info, e, file, line) A callback for finalize errors in D. A FinalizeError will be thrown.
onHiddenFuncError(o) A callback for hidden function errors in D. A HiddenFuncError will be thrown. Deprecated. This feature is not longer part of the language.
onInvalidMemoryOperationError(pretend_sideffect) A callback for invalid memory operations in D. An InvalidMemoryOperationError will be thrown.
onOutOfMemoryError(pretend_sideffect) A callback for out of memory errors in D. An OutOfMemoryError will be thrown.
onRangeError(file, line) A callback for array bounds errors in D. A RangeError will be thrown.
onUnicodeError(msg, idx, file, line) A callback for unicode errors in D. A UnicodeException will be thrown.
onUnittestErrorMsg(file, line, msg) A callback for unittest errors in D. The user-supplied unittest handler will be called if one has been supplied, otherwise the error will be written to stderr.
setAssertHandler(h) Overrides the default assert hander with a user-supplied version. Deprecated. Please use assertHandler instead.

Classes

NameDescription
AssertError Thrown on an assert error.
FinalizeError Thrown on finalize error.
HiddenFuncError Thrown on hidden function error. Deprecated. This feature is not longer part of the language.
InvalidMemoryOperationError Thrown on an invalid memory operation.
OutOfMemoryError Thrown on an out of memory error.
RangeError Thrown on a range error.
SwitchError Thrown on a switch error.
UnicodeException Thrown on a unicode conversion error.

Aliases

NameTypeDescription
AssertHandler nothrow void function(string, ulong, string) Gets/sets assert hander. null means the default handler is used.

Authors

Sean Kelly and Jonathan M Davis

License

Boost License 1.0.