diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-06-05 19:58:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-05 19:58:00 +0200 |
commit | 3cbc07ac7877b03c605498760fe198e3200cc197 (patch) | |
tree | 627af3020528cb916b3174bd94304307ca875c77 /lib | |
parent | b1f483c897bb2a881c059dc473c81ec66b3a32fb (diff) | |
parent | cfe40a3e6e920ed0c105af0012af739794c10b55 (diff) | |
download | Nim-3cbc07ac7877b03c605498760fe198e3200cc197.tar.gz |
Merge pull request #7770 from yglukhov/yield-in-try
Yield in try
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system/embedded.nim | 3 | ||||
-rw-r--r-- | lib/system/excpt.nim | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/system/embedded.nim b/lib/system/embedded.nim index 46e84e056..4d453fcca 100644 --- a/lib/system/embedded.nim +++ b/lib/system/embedded.nim @@ -41,3 +41,6 @@ proc reraiseException() {.compilerRtl.} = proc writeStackTrace() = discard proc setControlCHook(hook: proc () {.noconv.}) = discard + +proc closureIterSetupExc(e: ref Exception) {.compilerproc, inline.} = + sysFatal(ReraiseError, "exception handling is not available") diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim index fb38948f7..dabfe010e 100644 --- a/lib/system/excpt.nim +++ b/lib/system/excpt.nim @@ -131,6 +131,10 @@ proc popCurrentExceptionEx(id: uint) {.compilerRtl.} = quitOrDebug() prev.up = cur.up +proc closureIterSetupExc(e: ref Exception) {.compilerproc, inline.} = + if not e.isNil: + currException = e + # some platforms have native support for stack traces: const nativeStackTraceSupported* = (defined(macosx) or defined(linux)) and |