Changeset 249:e1ec1581e355

Show
Ignore:
Timestamp:
05/22/08 13:45:02 (4 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Fix ExceptionPrintStacktrace?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/dwthelper/utils.d

    r246 r249  
    2222import tango.text.UnicodeData; 
    2323static import tango.util.collection.model.Seq; 
    24 // static import tango.util.collection.ArraySeq; 
    25 // static import tango.util.collection.LinkSeq; 
    26 // static import tango.util.collection.model.Map; 
    27 // static import tango.util.collection.HashMap; 
    28 // 
    29 // alias tango.util.collection.model.Seq.Seq!(Object) List; 
    30 // alias tango.util.collection.ArraySeq.ArraySeq!(Object) ArrayList; 
    31 // alias tango.util.collection.LinkSeq.LinkSeq!(Object) LinkList; 
    32 // alias tango.util.collection.model.Map.Map!(Object,Object) Map; 
    33 // alias tango.util.collection.HashMap.HashMap!(Object,Object) HashMap; 
    3424 
    3525alias char[] String; 
     
    778768} 
    779769 
     770String ExceptionGetLocalizedMessage( Exception e ){ 
     771    return e.msg; 
     772} 
    780773 
    781774void ExceptionPrintStackTrace( Exception e ){ 
     
    786779    while( exception !is null ){ 
    787780        print.formatln( "Exception in {}({}): {}", exception.file, exception.line, exception.msg ); 
    788         foreach( msg; exception.info ){ 
    789             print.formatln( "trc {}", msg ); 
     781        if( exception.info !is null ){ 
     782            foreach( msg; exception.info ){ 
     783                print.formatln( "trc {}", msg ); 
     784            } 
    790785        } 
    791786        exception = exception.next;