Mercurial > projects > ldc
view lphobos/std/outofmemory.d @ 904:01d9ece9982a
Fix bug #177 by not attempting to define composite debug info for
forward-declared structs.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Fri, 23 Jan 2009 13:41:03 +0100 |
parents | 88e23f8c2354 |
children |
line wrap: on
line source
/** * Macros: * WIKI=Phobos/StdOutOfMemory * Copyright: * Placed into public domain. * www.digitalmars.com */ module std.outofmemory; /****** * This exception is thrown when out of memory errors happen. */ class OutOfMemoryException : Exception { static char[] s = "Out of memory"; /** * Default constructor */ this() { super(s); } char[] toString() { return s; } } extern (C) void _d_OutOfMemory() { printf("Out of memory!\n"); *(cast(int*) 0) = 0; throw cast(OutOfMemoryException) cast(void *) OutOfMemoryException.classinfo.init; } static this() { }