X-Git-Url: https://git.llucax.com/software/druntime.git/blobdiff_plain/0b47f875d2999e307bcd9498584c4d58749d3a3d..0edf44cfdbe2262d5c50bfa7368ba2692600babc:/import/object.di?ds=inline 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); +}