340 exception isNil ifTrue:[ |
340 exception isNil ifTrue:[ |
341 type := 'unknown exception'. |
341 type := 'unknown exception'. |
342 message := 'unknown exception occurred (no exception details available)' |
342 message := 'unknown exception occurred (no exception details available)' |
343 ] ifFalse:[ |
343 ] ifFalse:[ |
344 type := exception class name. |
344 type := exception class name. |
345 message := exception messageText ifNil:[ exception description ]. |
345 message := exception messageText notNil ifTrue:[ exception description ] ifFalse:[ 'no exception']. |
346 ]. |
346 ]. |
347 |
347 |
348 |
348 |
349 stream tab; tab; |
349 stream tab; tab; |
350 nextPut:$<; nextPutAll: result; |
350 nextPut:$<; nextPutAll: result; |
351 nextPutAll:' type="'; |
351 nextPutAll:' type="'; |
352 nextPutAll:(self encode:type); |
352 nextPutAll:(self encode:type); |
353 nextPutAll:'" message="'; |
353 nextPutAll:'" message="'; |
354 nextPutAll:(self encode: message); |
354 nextPutAll:(self encode: message); |
355 nextPutAll:'"><!![CDATA['; cr. |
355 nextPutAll:'"><!![CDATA['; cr. |
|
356 "/ Write system identification here so one can tell on which system |
|
357 "/ it failed. Jenkins JUnit plugin infortunately does not show this |
|
358 "/ info in it's own UI |
|
359 self writeCDATA: ('Hostname: ' , OperatingSystem getHostName , Character cr). |
|
360 self writeCDATA: ('OS: ' , OperatingSystem osName , Character cr). |
|
361 self writeCDATA: ('Arch: ' , OperatingSystem getCPUType , Character cr, Character cr). |
|
362 |
356 self writeCDATA: (stacktrace ? 'stacktrace not available'). |
363 self writeCDATA: (stacktrace ? 'stacktrace not available'). |
357 stream |
364 stream |
358 nextPutAll:']]></'; nextPutAll: result; nextPutAll:'>'; |
365 nextPutAll:']]></'; nextPutAll: result; nextPutAll:'>'; |
359 nextPut:Character lf |
366 nextPut:Character lf |
360 ]. |
367 ]. |