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
			a local clone.
		
	core.exception
The exception module defines all system-level exceptions and provides a
    mechanism to alter system-level error handling.
License: 
Authors: 
Sean Kelly and Jonathan M Davis
Source core/exception.d
- classRangeError: object.Error;
- Thrown on a range error.
- classArrayIndexError: core.exception.RangeError;
- Thrown when an out of bounds array index is accessed.- const size_tindex;
- Index into array
- const size_tlength;
- Length of indexed array
 
- classArraySliceError: core.exception.RangeError;
- Thrown when an out of bounds array slice is created- const size_tlower;
- Lower/upper bound passed to slice: array[lower.. upper]
- const size_tupper;
- Lower/upper bound passed to slice: array[lower ..upper]
- const size_tlength;
- Length of sliced array
 
- classAssertError: object.Error;
- Thrown on an assert error.
- classFinalizeError: object.Error;
- Thrown on finalize error.
- classOutOfMemoryError: object.Error;
- Thrown on an out of memory error.
- classInvalidMemoryOperationError: object.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.
- classForkError: object.Error;
- Thrown on a configuration error.
- classSwitchError: object.Error;
- Thrown on a switch error.
- classUnicodeException: object.Exception;
- Thrown on a unicode conversion error.
- aliasAssertHandler= void function(string file, ulong line, string msg) nothrow;
 nothrow @nogc @property @trusted AssertHandlerassertHandler();
 nothrow @nogc @property @trusted voidassertHandler(AssertHandlerhandler);
- Gets/sets assert hander. null means the default handler is used.
- nothrow voidonAssertError(stringfile= __FILE__, size_tline= __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.Parameters:string fileThe name of the file that signaled this error. size_t lineThe line number on which this error occurred. 
- nothrow voidonAssertErrorMsg(stringfile, size_tline, stringmsg);
- 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.Parameters:string fileThe name of the file that signaled this error. size_t lineThe line number on which this error occurred. string msgAn error message supplied by the user. 
- nothrow voidonUnittestErrorMsg(stringfile, size_tline, stringmsg);
- 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.Parameters:string fileThe name of the file that signaled this error. size_t lineThe line number on which this error occurred. string msgAn error message supplied by the user. 
- pure nothrow @nogc @trusted noreturnonRangeError(stringfile= __FILE__, size_tline= __LINE__);
- A callback for general array bounds errors in D. A RangeError will be thrown.Parameters:string fileThe name of the file that signaled this error. size_t lineThe line number on which this error occurred. Throws:
- pure nothrow @nogc @trusted noreturnonArraySliceError(size_tlower= 0, size_tupper= 0, size_tlength= 0, stringfile= __FILE__, size_tline= __LINE__);
- A callback for array slice out of bounds errors in D.Parameters:size_t lowerthe lower bound of the index passed of a slice size_t upperthe upper bound of the index passed of a slice or the index if not a slice size_t lengthlength of the array string fileThe name of the file that signaled this error. size_t lineThe line number on which this error occurred. Throws:
- pure nothrow @nogc @trusted noreturnonArrayIndexError(size_tindex= 0, size_tlength= 0, stringfile= __FILE__, size_tline= __LINE__);
- A callback for array index out of bounds errors in D.Parameters:size_t indexindex in the array size_t lengthlength of the array string fileThe name of the file that signaled this error. size_t lineThe line number on which this error occurred. Throws:
- nothrow @trusted noreturnonFinalizeError(TypeInfoinfo, Throwablee, stringfile= __FILE__, size_tline= __LINE__);
- A callback for finalize errors in D. A FinalizeError will be thrown.Parameters:TypeInfo infoThe TypeInfo instance for the object that failed finalization. Throwable eThe exception thrown during finalization. string fileThe name of the file that signaled this error. size_t lineThe line number on which this error occurred. Throws:
- pure nothrow @nogc @trusted noreturnonOutOfMemoryError(void*pretend_sideffect= null);
- A callback for out of memory errors in D. An OutOfMemoryError will be thrown.Throws:
- pure nothrow @nogc @trusted noreturnonInvalidMemoryOperationError(void*pretend_sideffect= null);
- A callback for invalid memory operations in D. An InvalidMemoryOperationError will be thrown.Throws:
- pure nothrow @nogc @trusted noreturnonForkError(stringfile= __FILE__, size_tline= __LINE__);
- A callback for errors in the case of a failed fork in D. A ForkError will be thrown.Parameters:string fileThe name of the file that signaled this error. size_t lineThe line number on which this error occurred. Throws:
- pure @safe noreturnonUnicodeError(stringmsg, size_tidx, stringfile= __FILE__, size_tline= __LINE__);
- A callback for unicode errors in D. A UnicodeException will be thrown.Parameters:string msgInformation about the error. size_t idxString index where this error was detected. string fileThe name of the file that signaled this error. size_t lineThe line number on which this error occurred. Throws:
- void_d_assertp(immutable(char)*file, uintline);
- 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_assert_msg(stringmsg, stringfile, uintline);
- 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_assert(stringfile, uintline);
- 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_unittestp(immutable(char)*file, uintline);
- 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_unittest_msg(stringmsg, stringfile, uintline);
- 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_unittest(stringfile, uintline);
- 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, uintline);
- Called when an invalid array index/slice or associative array key is accessedThese 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_arraybounds(stringfile, uintline);
- dittoThese 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_arraybounds_slicep(immutable(char*)file, uintline, size_tlower, size_tupper, size_tlength);
- Called when an out of range slice of an array is createdThese 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_arraybounds_slice(stringfile, uintline, size_tlower, size_tupper, size_tlength);
- dittoThese 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_arraybounds_indexp(immutable(char*)file, uintline, size_tindex, size_tlength);
- Called when an out of range array index is accessedThese 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_arraybounds_index(stringfile, uintline, size_tindex, size_tlength);
- dittoThese 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.
Copyright © 1999-2024 by the D Language Foundation | Page generated by
Ddoc on (no date time)