summary refs log tree commit diff stats
path: root/tests/js/t7224.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/js/t7224.nim')
-rw-r--r--tests/js/t7224.nim26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/js/t7224.nim b/tests/js/t7224.nim
new file mode 100644
index 000000000..2d7ee1336
--- /dev/null
+++ b/tests/js/t7224.nim
@@ -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)