phobos/std/outofmemory.d
Brad Roberts eec6be69ed Merge r297:387 from candidate to trunk.
-- add std.getopt
  -- add std.variant
  -- switch strings over to be invariant rather than const
  -- hopefully the last big linux makefile overhaul
  -- fix for bug 1579: write[ln] fails for obj.toString()
  -- fix negative precision handling in std.format
  -- add some file and directory iterator helpers
  -- among other little changes here and there...
2007-10-14 09:22:50 +00:00

45 lines
625 B
D

// Written in the D programming language
/**
* 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 string s = "Out of memory";
/**
* Default constructor
*/
this()
{
super(s);
}
override string toString()
{
return s;
}
}
extern (C) void _d_OutOfMemory()
{
throw cast(OutOfMemoryException)
cast(void *)
OutOfMemoryException.classinfo.init;
}
static this()
{
}