X-Git-Url: https://git.llucax.com/software/druntime.git/blobdiff_plain/e0289159505fc0ddeb7e2a4c48c328a8d7cc1174..97701d90b6977c5fb6b9a738cc1f152d80a422c9:/import/object.di 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); +}