# HG changeset patch # User Frank Benoit # Date 1211478302 -7200 # Node ID e1ec1581e355e306d482605f1f44d486af5ae592 # Parent 34409a2fc053979833ba7a536d30992cfcd054e8 Fix ExceptionPrintStacktrace diff -r 34409a2fc053 -r e1ec1581e355 dwt/dwthelper/utils.d --- a/dwt/dwthelper/utils.d Thu May 22 19:00:47 2008 +0200 +++ b/dwt/dwthelper/utils.d Thu May 22 19:45:02 2008 +0200 @@ -21,16 +21,6 @@ import tango.util.log.Trace; import tango.text.UnicodeData; static import tango.util.collection.model.Seq; -// static import tango.util.collection.ArraySeq; -// static import tango.util.collection.LinkSeq; -// static import tango.util.collection.model.Map; -// static import tango.util.collection.HashMap; -// -// alias tango.util.collection.model.Seq.Seq!(Object) List; -// alias tango.util.collection.ArraySeq.ArraySeq!(Object) ArrayList; -// alias tango.util.collection.LinkSeq.LinkSeq!(Object) LinkList; -// alias tango.util.collection.model.Map.Map!(Object,Object) Map; -// alias tango.util.collection.HashMap.HashMap!(Object,Object) HashMap; alias char[] String; alias tango.text.Text.Text!(char) StringBuffer; @@ -777,6 +767,9 @@ return s.poolsize; } +String ExceptionGetLocalizedMessage( Exception e ){ + return e.msg; +} void ExceptionPrintStackTrace( Exception e ){ ExceptionPrintStackTrace( e, Stderr ); @@ -785,8 +778,10 @@ Exception exception = e; while( exception !is null ){ print.formatln( "Exception in {}({}): {}", exception.file, exception.line, exception.msg ); - foreach( msg; exception.info ){ - print.formatln( "trc {}", msg ); + if( exception.info !is null ){ + foreach( msg; exception.info ){ + print.formatln( "trc {}", msg ); + } } exception = exception.next; }