X-Git-Url: https://git.llucax.com/software/druntime.git/blobdiff_plain/e0289159505fc0ddeb7e2a4c48c328a8d7cc1174..0edf44cfdbe2262d5c50bfa7368ba2692600babc:/import/object.di?ds=sidebyside diff --git a/import/object.di b/import/object.di index 1745bbb..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,9 +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(); } + + +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); +}