add simple writeStackTrace for JS backend (#16016)

* add simple writeStackTrace for JS backend

* add testcase for writeStackTrace

* changelog
This commit is contained in:
flywind 2020-11-25 02:45:06 +08:00 • committed by GitHub
commit 19e224866b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 1 deletions

View file

@ -1765,7 +1765,7 @@ when notJSnotNims and defined(nimSeqsV2):
{.pop.}
when notJSnotNims:
when not defined(nimscript):
proc writeStackTrace*() {.tags: [], gcsafe, raises: [].}
## Writes the current stack trace to ``stderr``. This is only works
## for debug builds. Since it's usually used for debugging, this