summary refs log tree commit diff stats
path: root/tests/js/t7224.nim
blob: 2d7ee133699bde6f5cb54bdd8909d7f9a6346185 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)