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

@ -0,0 +1,12 @@
discard """
cmd: "nim js --panics:on $file"
output: '''Traceback (most recent call last)
twritestacktrace.nim(12) at module twritestacktrace
twritestacktrace.nim(10) at twritestacktrace.hello
'''
"""
proc hello() =
writeStackTrace()
hello()