sysasserts leaner again
This commit is contained in:
parent
23340695d0
commit
40881a4140
1 changed files with 1 additions and 7 deletions
|
|
@ -835,16 +835,10 @@ proc quit*(errorcode: int = QuitSuccess) {.
|
|||
## It does *not* call the garbage collector to free all the memory,
|
||||
## unless a quit procedure calls ``GC_collect``.
|
||||
|
||||
proc WriteStackTrace()
|
||||
|
||||
var checkDisabled: bool
|
||||
|
||||
template sysAssert(cond, msg: expr) =
|
||||
when defined(useSysAssert):
|
||||
if not checkDisabled and not cond:
|
||||
checkDisabled = true
|
||||
if not cond:
|
||||
echo "[SYSASSERT] ", msg
|
||||
WriteStackTrace()
|
||||
quit 1
|
||||
nil
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue