summary refs log tree commit diff stats
path: root/lib/system/excpt.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-05-06 01:16:36 +0200
committerAraq <rumpf_a@web.de>2012-05-06 01:16:36 +0200
commitc323ec0155cc426e604e0c53a6baf00b17e439d7 (patch)
tree1f585f7bd06fd7b25b12e1d7329a33d093abaa4f /lib/system/excpt.nim
parentc3770ebd061649717d50bc74f718427af5be0ed5 (diff)
downloadNim-c323ec0155cc426e604e0c53a6baf00b17e439d7.tar.gz
added system.getStackTrace; docgen refactoring (incomplete)
Diffstat (limited to 'lib/system/excpt.nim')
-rwxr-xr-xlib/system/excpt.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim
index 2df7fe4ad..a523e4e04 100755
--- a/lib/system/excpt.nim
+++ b/lib/system/excpt.nim
@@ -246,6 +246,13 @@ proc WriteStackTrace() =
   else:
     writeToStdErr("No stack traceback available\n")
 
+proc getStackTrace(): string =
+  when hasSomeStackTrace:
+    result = ""
+    rawWriteStackTrace(result)
+  else:
+    result = "No stack traceback available\n"
+
 when defined(endb):
   var
     dbgAborting: bool # whether the debugger wants to abort