assertions: make assert follow excessiveStackTrace (#11574)

This commit is contained in:
alaviss
2019-06-25 05:23:22 +07:00
committed by Andreas Rumpf
parent e9a23cee0a
commit 403fd3ac43

View File

@@ -31,9 +31,7 @@ template assertImpl(cond: bool, msg: string, expr: string, enabled: static[bool]
bind instantiationInfo
mixin failedAssertImpl
when enabled:
# for stacktrace; fixes #8928 ; Note: `fullPaths = true` is correct
# here, regardless of --excessiveStackTrace
{.line: instantiationInfo(fullPaths = true).}:
{.line: instantiationInfo(fullPaths = compileOption("excessiveStackTrace")).}:
if not cond:
failedAssertImpl(loc & " `" & expr & "` " & msg)