core.exception

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

Members

Aliases

AssertHandler
alias AssertHandler = void function(string file, size_t line, string msg) nothrow

Gets/sets assert hander. null means the default handler is used.

Classes

AssertError
class AssertError

Thrown on an assert error.

FinalizeError
class FinalizeError

Thrown on finalize error.

InvalidMemoryOperationError
class InvalidMemoryOperationError

Thrown on an invalid memory operation.

OutOfMemoryError
class OutOfMemoryError

Thrown on an out of memory error.

SwitchError
class SwitchError

Thrown on a switch error.

UnicodeException
class UnicodeException

Thrown on a unicode conversion error.

Functions

_d_assertp
void _d_assertp(immutable(char)* file, uint line)

Function calls to these are generated by the compiler and inserted into the object code.

assertHandler
AssertHandler assertHandler()
void assertHandler(AssertHandler handler)

Gets/sets assert hander. null means the default handler is used.

onAssertError
void onAssertError(string file = __FILE__, size_t line = __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
void onAssertErrorMsg(string file, size_t line, string 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
void onFinalizeError(TypeInfo info, Throwable e, string file = __FILE__, size_t line = __LINE__)

A callback for finalize errors in D. A FinalizeError will be thrown.

onInvalidMemoryOperationError
void onInvalidMemoryOperationError(void* pretend_sideffect = null)

A callback for invalid memory operations in D. An InvalidMemoryOperationError will be thrown.

onOutOfMemoryError
void onOutOfMemoryError(void* pretend_sideffect = null)

A callback for out of memory errors in D. An OutOfMemoryError will be thrown.

onRangeError
void onRangeError(string file = __FILE__, size_t line = __LINE__)

A callback for array bounds errors in D. A RangeError will be thrown.

onUnicodeError
void onUnicodeError(string msg, size_t idx, string file = __FILE__, size_t line = __LINE__)

A callback for unicode errors in D. A UnicodeException will be thrown.

onUnittestErrorMsg
void onUnittestErrorMsg(string file, size_t line, string 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.

Meta

Suggestion Box / Bug Report