parent
d4af0554c4
commit
84351da9d8
1 changed files with 5 additions and 5 deletions
|
|
@ -27,12 +27,12 @@ proc failedAssertImpl*(msg: string) {.raises: [], tags: [].} =
|
|||
Hide(raiseAssert)(msg)
|
||||
|
||||
template assertImpl(cond: bool, msg: string, expr: string, enabled: static[bool]) =
|
||||
const
|
||||
loc = instantiationInfo(fullPaths = compileOption("excessiveStackTrace"))
|
||||
ploc = $loc
|
||||
bind instantiationInfo
|
||||
mixin failedAssertImpl
|
||||
when enabled:
|
||||
const
|
||||
loc = instantiationInfo(fullPaths = compileOption("excessiveStackTrace"))
|
||||
ploc = $loc
|
||||
bind instantiationInfo
|
||||
mixin failedAssertImpl
|
||||
{.line: loc.}:
|
||||
if not cond:
|
||||
failedAssertImpl(ploc & " `" & expr & "` " & msg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue