mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
This commit is contained in:
committed by
Andreas Rumpf
parent
3838e2a8d7
commit
d07d148597
@@ -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 & '(' &
|
||||
|
||||
Reference in New Issue
Block a user