# core.exception

The exception module defines all system-level exceptions and provides a mechanism to alter system-level error handling.
License:
Boost License 1.0.
Authors:
Sean Kelly
Copyright Sean Kelly 2005 - 2009. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at ) http:
//www.boost.org/LICENSE_1_0.txt

class RangeError: object.Error;
  Thrown on a range error.
class AssertError: object.Error;
  Thrown on an assert error.
class FinalizeError: object.Error;
  Thrown on finalize error.
class HiddenFuncError: object.Error;
  Thrown on hidden function error.
class OutOfMemoryError: object.Error;
  Thrown on an out of memory error.
class SwitchError: object.Error;
  Thrown on a switch error.
class UnicodeException: object.Exception;
  Thrown on a unicode conversion error.
deprecated void setAssertHandler(errorHandlerType h);
  Overrides the default assert hander with a user-supplied version.
  Params:

  errorHandlerType h | The new assert handler. Set to null to use the default handler.

void onAssertError(string file, size_t 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.
  Params:

  string file | The name of the file that signaled this error.
  size_t line | The line number on which this error occurred.

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.
  Params:

  string file | The name of the file that signaled this error.
  size_t line | The line number on which this error occurred.
  string msg | An error message supplied by the user.

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.
  Params:

  string file | The name of the file that signaled this error.
  size_t line | The line number on which this error occurred.
  string msg | An error message supplied by the user.

void onRangeError(string file, size_t line);
  A callback for array bounds errors in D. A RangeError will be thrown.
  Params:

  string file | The name of the file that signaled this error.
  size_t line | The line number on which this error occurred.

  Throws:
  RangeError.
void onFinalizeError(ClassInfo info, Exception ex);
  A callback for finalize errors in D. A FinalizeError will be thrown.
  Params:

  e | The exception thrown during finalization.

  Throws:
  FinalizeError.
void onHiddenFuncError(Object o);
  A callback for hidden function errors in D. A HiddenFuncError will be thrown.
  Throws:
  HiddenFuncError.
void onOutOfMemoryError();
  A callback for out of memory errors in D. An OutOfMemoryError will be thrown.
  Throws:
  OutOfMemoryError.
void onSwitchError(string file, size_t line);
  A callback for switch errors in D. A SwitchError will be thrown.
  Params:

  string file | The name of the file that signaled this error.
  size_t line | The line number on which this error occurred.

  Throws:
  SwitchError.
void onUnicodeError(string msg, size_t idx);
  A callback for unicode errors in D. A UnicodeException will be thrown.
  Params:

  string msg | Information about the error.
  size_t idx | String index where this error was detected.

  Throws:
  UnicodeException.

Page generated by Ddoc. Copyright Sean Kelly 2005 - 2009.