summary refs log tree commit diff stats
path: root/tests/system/tnim_stacktrace_override.nim
blob: c75da9d9b7e2ca851d047ab799ac4dfae5ee3690 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
discard """
  cmd: "nim c -d:nimStacktraceOverride $file"
  output: '''begin
Traceback (most recent call last, using override)
Error: unhandled exception: stack trace produced [ValueError]
'''
  exitcode: 1
"""

import asyncfutures

proc main =
  echo "begin"
  if true:
    raise newException(ValueError, "stack trace produced")
  echo "unreachable"

main()