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) ditto
_d_arraybounds_index(file, line, index, length) ditto
_d_arraybounds_indexp(file, line, index, length) Called when an out of range array index is accessed
_d_arraybounds_slice(file, line, lower, upper, length) ditto
_d_arraybounds_slicep(file, line, lower, upper, length) Called when an out of range slice of an array is created
_d_arrayboundsp(file, line) Called when an invalid array index/slice or associative array key is accessed
_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.
onArrayIndexError() A callback for array index out of bounds errors in D.
onArraySliceError() A callback for array slice out of bounds errors in D.
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() A callback for finalize errors in D. A FinalizeError will be thrown.
onForkError() A callback for errors in the case of a failed fork in D. A ForkError will be thrown.
onInvalidMemoryOperationError() A callback for invalid memory operations in D. An InvalidMemoryOperationError will be thrown.
onOutOfMemoryError() A callback for out of memory errors in D. An OutOfMemoryError will be thrown.
onRangeError() A callback for general array bounds errors in D. A RangeError will be thrown.
onUnicodeError() 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.

Classes

NameDescription
ArrayIndexError Thrown when an out of bounds array index is accessed.
ArraySliceError Thrown when an out of bounds array slice is created
AssertError Thrown on an assert error.
FinalizeError Thrown on finalize error.
ForkError Thrown on a configuration error.
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.