even more sys assertions
This commit is contained in:
parent
2673d73366
commit
76886432da
6 changed files with 68 additions and 33 deletions
|
|
@ -832,10 +832,10 @@ proc quit*(errorcode: int = QuitSuccess) {.
|
|||
## unless a quit procedure calls ``GC_collect``.
|
||||
|
||||
template sysAssert(cond, msg: expr) =
|
||||
# change this to activate system asserts
|
||||
#if not cond:
|
||||
# echo "[SYSASSERT] ", msg
|
||||
# quit 1
|
||||
when defined(useSysAssert):
|
||||
if not cond:
|
||||
echo "[SYSASSERT] ", msg
|
||||
quit 1
|
||||
nil
|
||||
|
||||
include "system/inclrtl"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue