sysasserts leaner again

This commit is contained in:
Araq
2012-01-29 02:20:59 +01:00
parent 23340695d0
commit 40881a4140

View File

@@ -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