writeStackTrace now officially has no IO effect anymore for more convenient debugging
This commit is contained in:
parent
8c98277d5a
commit
6266c68ab6
3 changed files with 8 additions and 4 deletions
|
|
@ -3211,9 +3211,10 @@ when not defined(JS): #and not defined(nimscript):
|
|||
## allows you to override the behaviour of your application when CTRL+C
|
||||
## is pressed. Only one such hook is supported.
|
||||
|
||||
proc writeStackTrace*() {.tags: [WriteIOEffect], gcsafe.}
|
||||
proc writeStackTrace*() {.tags: [], gcsafe.}
|
||||
## writes the current stack trace to ``stderr``. This is only works
|
||||
## for debug builds.
|
||||
## for debug builds. Since it's usually used for debugging, this
|
||||
## is proclaimed to have no IO effect!
|
||||
when hostOS != "standalone":
|
||||
proc getStackTrace*(): string {.gcsafe.}
|
||||
## gets the current stack trace. This only works for debug builds.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue