diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-01-03 18:56:05 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-01-03 18:56:05 +0100 |
commit | cb9110c43d4ae9c29a0a1e0d54f7735712d4ba62 (patch) | |
tree | 630e4ab6d76a8415beb7d8135ea9531179d99c78 /lib/system/excpt.nim | |
parent | 2ee2022c29ec4774eda51cb431052a9fc24982a7 (diff) | |
download | Nim-cb9110c43d4ae9c29a0a1e0d54f7735712d4ba62.tar.gz |
--define:nimQuirky exception handling for Nim; in preparation of a blog post
Diffstat (limited to 'lib/system/excpt.nim')
-rw-r--r-- | lib/system/excpt.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim index 84a1da343..3c0e42c6e 100644 --- a/lib/system/excpt.nim +++ b/lib/system/excpt.nim @@ -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): |