--define:nimQuirky exception handling for Nim; in preparation of a blog post
This commit is contained in:
parent
2ee2022c29
commit
cb9110c43d
7 changed files with 77 additions and 32 deletions
|
|
@ -357,6 +357,8 @@ proc raiseExceptionAux(e: ref Exception) =
|
|||
raiseCounter.inc # skip zero at overflow
|
||||
e.raiseId = raiseCounter
|
||||
{.emit: "`e`->raise();".}
|
||||
elif defined(nimQuirky):
|
||||
if currException == nil: currException = e
|
||||
else:
|
||||
if excHandler != nil:
|
||||
if not excHandler.hasRaiseAction or excHandler.raiseAction(e):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue