/runtime/exception.d

http://github.com/wilkie/djehuty · D · 21 lines · 8 code · 5 blank · 8 comment · 0 complexity · 43c981e39cec1a595d07ad45689871ed MD5 · raw file

  1. /*
  2. * exception.d
  3. *
  4. * This module implements the Exception base class and the runtime functions.
  5. *
  6. */
  7. module runtime.exception;
  8. import core.exception;
  9. extern(C):
  10. // Description: This function will carefully throw an out of memory exception.
  11. void onOutOfMemoryError() {
  12. // Throw this without allocation
  13. throw cast(MemoryException.OutOfMemory)cast(void*)MemoryException.OutOfMemory.classinfo.init;
  14. }
  15. void _d_throw_exception(Object e) {
  16. }