comparison lphobos/std/outofmemory.d @ 89:ccca1c13e13a trunk

[svn r93] a few fixes, some phobos additions. some very rough groundwork for moduleinfo and classinfo support
author lindquist
date Wed, 07 Nov 2007 02:45:47 +0100
parents
children 88e23f8c2354
comparison
equal deleted inserted replaced
88:058d3925950e 89:ccca1c13e13a
1 /**
2 * Macros:
3 * WIKI=Phobos/StdOutOfMemory
4 * Copyright:
5 * Placed into public domain.
6 * www.digitalmars.com
7 */
8
9
10 module std.outofmemory;
11
12 /******
13 * This exception is thrown when out of memory errors happen.
14 */
15
16 class OutOfMemoryException : Exception
17 {
18 static char[] s = "Out of memory";
19
20 /**
21 * Default constructor
22 */
23 this()
24 {
25 super(s);
26 }
27
28 char[] toString()
29 {
30 return s;
31 }
32 }
33
34 extern (C) void _d_OutOfMemory()
35 {
36 assert(0);
37 /*throw cast(OutOfMemoryException)
38 cast(void *)
39 OutOfMemoryException.classinfo.init;*/
40 }
41
42 static this()
43 {
44 }