Mercurial > projects > dwt-win
changeset 228:628e9518870e
Fix ExceptionPrintStacktrace
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 22 May 2008 19:46:10 +0200 |
parents | b74b74ce5c7d |
children | 5ff96efb6f4b |
files | dwt/dwthelper/utils.d |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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; }