fixed #96 as good as technically possible (debug frames are allocated on the C stack)
This commit is contained in:
parent
2dd0f8eeab
commit
9083f01fd2
3 changed files with 10 additions and 10 deletions
|
|
@ -2129,16 +2129,16 @@ template assert*(cond: expr, msg = "") =
|
|||
## Use ``assert`` for debugging purposes only.
|
||||
bind raiseAssert, InstantiationInfo
|
||||
when compileOption("assertions"):
|
||||
if not cond:
|
||||
{.line.}:
|
||||
{.line.}:
|
||||
if not cond:
|
||||
raiseAssert(astToStr(cond) & ' ' & msg)
|
||||
|
||||
template doAssert*(cond: expr, msg = "") =
|
||||
## same as `assert` but is always turned on and not affected by the
|
||||
## ``--assertions`` command line switch.
|
||||
bind raiseAssert, InstantiationInfo
|
||||
if not cond:
|
||||
{.line: InstantiationInfo().}:
|
||||
{.line: InstantiationInfo().}:
|
||||
if not cond:
|
||||
raiseAssert(astToStr(cond) & ' ' & msg)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue