# HG changeset patch # User Frank Benoit # Date 1211478370 -7200 # Node ID 628e9518870e0fe149ead0a1285f6395bdedab11 # Parent b74b74ce5c7deaeafa4cf679fb03e9340c74da99 Fix ExceptionPrintStacktrace diff -r b74b74ce5c7d -r 628e9518870e dwt/dwthelper/utils.d --- a/dwt/dwthelper/utils.d Mon May 19 22:30:33 2008 +0200 +++ b/dwt/dwthelper/utils.d Thu May 22 19:46:10 2008 +0200 @@ -767,6 +767,9 @@ return s.poolsize; } +String ExceptionGetLocalizedMessage( Exception e ){ + return e.msg; +} void ExceptionPrintStackTrace( Exception e ){ ExceptionPrintStackTrace( e, Stderr ); @@ -775,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; }