TracedException - exception with stacktrace information

kris foo at bar.com
Fri Jan 26 12:09:46 PST 2007


Thomas Kuehne wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Flectioned now includes a TracedException class that provides stack
> trace information.
> 
> sample:
> # import cn.kuehne.flectioned;
> # 
> # class MyException : TracedException{
> #    this(char[] message){
> #       super(message);
> #    }
> # }
> # 
> # void foo(int i){
> #    if(i > 0) {
> #       foo(i - 1);
> #    } else {
> #       throw new MyException("message");
> #    }
> # }
> # 
> # void main(){
> #    foo(2);
> # }
> 
> # Error: (sample.MyException) message
> #    0xFC8967F0   0x804F612   void sample.foo(int)
> #    0xFC8967F8   0x804F5F1   void sample.foo(int)
> #    0xFC896800   0x804F5F1   void sample.foo(int)
> #    0xFC896808   0x804F629   int main(char[][])
> #    0xFC896838   0x8050E7F   extern(C) int main(int, char**)
> 
> Flectioned:
> http://flectioned.kuehne.cn
> 
> Thomas

This is just awesome! Very nice, thomasK :)



More information about the Digitalmars-d-announce mailing list