X-Git-Url: https://git.llucax.com/software/druntime.git/blobdiff_plain/0b47f875d2999e307bcd9498584c4d58749d3a3d..11034b79381400b2f6ed6548468b329a811f9e19:/import/object.di diff --git a/import/object.di b/import/object.di index 3301d27..065af6b 100644 --- a/import/object.di +++ b/import/object.di @@ -22,6 +22,8 @@ class Object void lock(); void unlock(); } + + static Object factory(string classname); } struct Interface @@ -206,14 +208,14 @@ class ModuleInfo void function() dtor; void function() unitTest; - static int opApply( int delegate( inout ModuleInfo ) ); + static int opApply(int delegate(inout ModuleInfo)); } -class Exception : Object +class Throwable : Object { interface TraceInfo { - int opApply( int delegate(inout char[]) ); + int opApply(int delegate(inout char[])); string toString(); } @@ -221,12 +223,23 @@ class Exception : Object string file; size_t line; TraceInfo info; - Exception next; + Throwable next; - this(string msg, Exception next = null); - this(string msg, string file, size_t line, Exception next = null); + this(string msg, Throwable next = null); + this(string msg, string file, size_t line, Throwable next = null); override string toString(); } -alias Exception Error; +class Exception : Throwable +{ + this(string msg, Throwable next = null); + this(string msg, string file, size_t line, Throwable next = null); +} + + +class Error : Throwable +{ + this(string msg, Throwable next = null); + this(string msg, string file, size_t line, Throwable next = null); +}