diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2018-07-29 22:39:58 -0700 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-07-30 07:39:58 +0200 |
commit | d07d148597f999de873867dcafc39411b49d009d (patch) | |
tree | c1840ca3b80e42c8fa4eb4dc528cbb6a65335856 /lib/system.nim | |
parent | 3838e2a8d7dc4a0167d50231016177b4b9501fff (diff) | |
download | Nim-d07d148597f999de873867dcafc39411b49d009d.tar.gz |
fixes #7492 excessiveStackTrace:on shows non-absolute file in stacktrace (#8469)
Diffstat (limited to 'lib/system.nim')
-rw-r--r-- | lib/system.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/system.nim b/lib/system.nim index dae760ef8..0cfa39e19 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -3771,7 +3771,9 @@ template doAssert*(cond: bool, msg = "") = ## same as `assert` but is always turned on and not affected by the ## ``--assertions`` command line switch. bind instantiationInfo - {.line: instantiationInfo().}: + # NOTE: `true` is correct here; --excessiveStackTrace:on will control whether + # or not to output full paths. + {.line: instantiationInfo(-1, true).}: if not cond: raiseAssert(astToStr(cond) & ' ' & instantiationInfo(-1, false).fileName & '(' & |