Sync line generation between C and JS backends (#8888)

Fixes #7224
This commit is contained in:
LemonBoy 2018-09-07 01:56:36 +02:00 • committed by Andreas Rumpf
commit 84eab97fed
2 changed files with 29 additions and 3 deletions

26
tests/js/t7224.nim Normal file
View file

@ -0,0 +1,26 @@
discard """
cmd: "nim $target $options --stackTrace:on --lineTrace:on $file"
outputsub: '''
t7224.aaa, line: 21
t7224.bbb, line: 18
t7224.ccc, line: 15
t7224.ddd, line: 12
'''
"""
proc ddd() =
raise newException(IOError, "didn't do stuff")
proc ccc() =
ddd()
proc bbb() =
ccc()
proc aaa() =
bbb()
try:
aaa()
except IOError as e:
echo getStackTrace(e)