mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
14 lines
204 B
Nim
14 lines
204 B
Nim
discard """
|
|
output: "caught!"
|
|
"""
|
|
# Test inheritance for exception matching:
|
|
|
|
try:
|
|
raise newException(OSError, "dummy message")
|
|
except Exception:
|
|
echo "caught!"
|
|
except:
|
|
echo "wtf!?"
|
|
|
|
#OUT caught!
|