core.exception
The exception module defines all system-level exceptions and provides a mechanism to alter system-level error handling.
Copyright
Types 17
Thrown when an out of bounds array index is accessed.
size_t indexIndex into arraysize_t lengthLength of indexed arrayprivate char[100] msgBufthis(size_t index, size_t length, string file = __FILE__,
size_t line = __LINE__, Throwable next = null)Thrown when an out of bounds array slice is created
size_t lowerLower/upper bound passed to slice: `array[lower .. upper]`size_t lengthLength of sliced arrayprivate char[120] msgBufthis(size_t lower, size_t upper, size_t length, string file = __FILE__,
size_t line = __LINE__, Throwable next = null)Thrown when a null dereference may occur.
Depends upon null dereference check, or a signal handler to throw.
Thrown on an out of memory error.
Thrown on an invalid memory operation.
An invalid memory operation error occurs in circumstances when the garbage collector has detected an operation it cannot reliably handle. The default D GC is not re-entrant, so this can happen due to allocations done from within finalizers called during a garbage collection cycle.
this(string file = __FILE__, size_t line = __LINE__, Throwable next = null )Thrown on a configuration error.
this( string file = __FILE__, size_t line = __LINE__, Throwable next = null )Thrown on a switch error.
this( string msg, string file = __FILE__, size_t line = __LINE__, Throwable next = null )Thrown on a unicode conversion error.
size_t idxthis( string msg, size_t idx, string file = __FILE__, size_t line = __LINE__, Throwable next = null )Gets/sets assert hander. null means the default handler is used.
Gets/sets the Throwable filter function for threads. null means no handler is called.
Gets/sets null dereference handler. null means the default handler is used.
Functions 33
void rangeMsgPut(ref char[] r, scope const(char)[] e) @nogc nothrow pure @safeMini `std.range.primitives: put` for constructor of ArraySliceError / ArrayIndexErrorvoid filterThreadThrowableHandler(FilterThreadThrowableHandler handler) @property @trusted nothrow @nogcdittovoid onAssertError( string file = __FILE__, size_t line = __LINE__ ) extern(C) nothrowA 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.void onAssertErrorMsg( string file, size_t line, string msg ) extern(C) nothrowA 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.void onNullPointerError(string file = __FILE__, size_t line = __LINE__) extern(C) nothrowA callback for null dereference errors in D. The user-supplied dereference handler will be called if one has been supplied, otherwise an NullPointerError will be thrown.void onUnittestErrorMsg( string file, size_t line, string msg ) extern(C) nothrowA 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.noreturn onRangeError( string file = __FILE__, size_t line = __LINE__ ) extern(C) @trusted pure nothrow @nogcA callback for general array bounds errors in D. A RangeError will be thrown.noreturn onArraySliceError( size_t lower = 0, size_t upper = 0, size_t length = 0,
string file = __FILE__, size_t line = __LINE__ ) extern(C) @trusted pure nothrow @nogcA callback for array slice out of bounds errors in D.noreturn onArrayIndexError( size_t index = 0, size_t length = 0,
string file = __FILE__, size_t line = __LINE__ ) extern(C) @trusted pure nothrow @nogcA callback for array index out of bounds errors in D.noreturn onFinalizeError( TypeInfo info, Throwable e, string file = __FILE__, size_t line = __LINE__ ) extern(C) @trusted nothrowA callback for finalize errors in D. A FinalizeError will be thrown.noreturn onInvalidMemoryOperationError(void * pretend_sideffect = null, string file = __FILE__, size_t line = __LINE__) extern(C) @trusted pure nothrow @nogcA callback for invalid memory operations in D. An InvalidMemoryOperationError will be thrown.noreturn onForkError( string file = __FILE__, size_t line = __LINE__ ) extern(C) @trusted pure nothrow @nogcA callback for errors in the case of a failed fork in D. A ForkError will be thrown.noreturn onUnicodeError( string msg, size_t idx, string file = __FILE__, size_t line = __LINE__ ) extern(C) @safe pureA callback for unicode errors in D. A UnicodeException will be thrown.void _d_assertp(immutable(char) * file, uint line) extern(C)These functions must be defined for any D program linked against this library. Function calls to these are generated by the compiler and inserted into the object code.void _d_arrayboundsp(immutable(char *) file, uint line) extern(C)Called when an invalid array index/slice or associative array key is accessedvoid _d_arraybounds_slicep(immutable(char *) file, uint line, size_t lower, size_t upper, size_t length) extern(C)Called when an out of range slice of an array is createdvoid _d_arraybounds_slice(string file, uint line, size_t lower, size_t upper, size_t length) extern(C)dittovoid _d_arraybounds_indexp(immutable(char *) file, uint line, size_t index, size_t length) extern(C)Called when an out of range array index is accessedT staticError(T, Args...)(auto ref Args args) if (is(T : Error))Variables 4
void[256] _store