writeStackTrace now officially has no IO effect anymore for more convenient debugging

This commit is contained in:
Andreas Rumpf
2018-01-21 21:08:51 +01:00
parent 8c98277d5a
commit 6266c68ab6
3 changed files with 8 additions and 4 deletions

View File

@@ -386,9 +386,9 @@ proc writeStackTrace() =
when hasSomeStackTrace:
var s = ""
rawWriteStackTrace(s)
showErrorMessage(s)
cast[proc (s: string) {.noSideEffect, tags: [], nimcall.}](showErrorMessage)(s)
else:
showErrorMessage("No stack traceback available\n")
cast[proc (s: string) {.noSideEffect, tags: [], nimcall.}](showErrorMessage)("No stack traceback available\n")
proc getStackTrace(): string =
when hasSomeStackTrace: