X-Git-Url: https://git.llucax.com/software/druntime.git/blobdiff_plain/1f3a9af059166187064490d1cae80bd11fb8737c..ac851218e2879223231054e24e4c18692756b284:/src/core/exception.d diff --git a/src/core/exception.d b/src/core/exception.d index 1dd603d..e44392a 100644 --- a/src/core/exception.d +++ b/src/core/exception.d @@ -29,6 +29,18 @@ class ArrayBoundsException : Exception } +/** + * Thrown on hidden function error. + */ +class HiddenFuncException : Exception +{ + this(ClassInfo ci) + { + super("hidden method called for " ~ ci.name); + } +} + + /** * Thrown on an assert error. */ @@ -249,3 +261,20 @@ extern (C) void onUnicodeError( string msg, size_t idx ) { throw new UnicodeException( msg, idx ); } + +/******************************************** + * Called by the compiler generated code. + */ + +extern (C) void _d_hidden_func() +{ Object o; + asm + { + mov o, EAX; + } + + //printf("_d_hidden_func()\n"); + auto a = new HiddenFuncException(o.classinfo); + //printf("assertion %p created\n", a); + throw a; +}