summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/system/excpt.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim
index aedb0ef4b..fd7557ef0 100755
--- a/lib/system/excpt.nim
+++ b/lib/system/excpt.nim
@@ -206,7 +206,8 @@ proc raiseExceptionAux(e: ref E_Base) =
   else:
     when hasSomeStackTrace:
       var buf = newStringOfCap(2000)
-      rawWriteStackTrace(buf)
+      if isNil(e.trace): rawWriteStackTrace(buf)
+      else: add(buf, e.trace)
       add(buf, "Error: unhandled exception: ")
       if not isNil(e.msg): add(buf, e.msg)
       add(buf, " [")