summary refs log tree commit diff stats
path: root/tests/exception/texcsub.nim
blob: 02125d2c036f04a0c0e4093f88435f7d3249c762 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
discard """
  file: "texcsub.nim"
  output: "caught!"
"""
# Test inheritance for exception matching:

try:
  raise newException(OSError, "dummy message")
except Exception:
  echo "caught!"
except:
  echo "wtf!?"

#OUT caught!