mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 17:34:43 +00:00
20 lines
369 B
Nim
20 lines
369 B
Nim
discard """
|
|
output: '''
|
|
tfailedassert_stacktrace.nim(16) tfailedassert_stacktrace
|
|
tfailedassert_stacktrace.nim(15) foo
|
|
system.nim(3778) failedAssertImpl
|
|
system.nim(3771) raiseAssert
|
|
system.nim(2818) sysFatal
|
|
'''
|
|
"""
|
|
|
|
|
|
|
|
try:
|
|
proc foo() =
|
|
assert(false)
|
|
foo()
|
|
except AssertionError:
|
|
let e = getCurrentException()
|
|
echo e.getStackTrace
|