mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 14:10:30 +03:00

-- 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...
45 lines
625 B
D
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()
|
|
{
|
|
}
|