Cannot make a personalized exception
Vermi
aurelien.vermifuge at gmail.com
Fri May 11 11:38:13 PDT 2007
I'm trying to make a custom Exception class with this :
class MyException : Exception
{
static char[] s = "My Exception";
this()
{
super(s);
}
char[] toString()
{
return s;
}
}
it compile well, until I want to throw it :/
When I put the line :
throw new MyException();
I get that error :
webcache.obj(webcache)
Error 42: Symbol Undefined _D4util10linkedlist13TestException7__ClassZ
webcache.obj(webcache)
Error 42: Symbol Undefined _D4util10linkedlist13TestException5_ctorMFAaZC4util10linkedlist13TestException
--- errorlevel 2
The two class ( Exception and thrower class ) are in the same file. I tried Copy / Past examples from the site, but it still donc work. An idea ?
More information about the Digitalmars-d-learn
mailing list