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.nim28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/js/t7224.nim b/tests/js/t7224.nim
new file mode 100644
index 000000000..77fef10a7
--- /dev/null
+++ b/tests/js/t7224.nim
@@ -0,0 +1,28 @@
+discard """
+  cmd: "nim $target $options --stackTrace:on --lineTrace:on $file"
+  outputsub: '''
+t7224.nim(25) at module t7224
+t7224.nim(22) at t7224.aaa
+t7224.nim(19) at t7224.bbb
+t7224.nim(16) at t7224.ccc
+t7224.nim(13) at t7224.ddd
+'''
+"""
+
+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)