Yield in try
This commit is contained in:
parent
0ed6c3e476
commit
ce63490928
6 changed files with 711 additions and 93 deletions
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue