make --gc:arc --exceptions:quirky work again [backport:1.4] (#16583)
* make --gc:arc --exceptions:quirky work again [backport:1.4] * fixes #16404 [backport:1.4]
This commit is contained in:
parent
80c8f06663
commit
6317e4004d
8 changed files with 49 additions and 17 deletions
|
|
@ -44,3 +44,13 @@ proc setControlCHook(hook: proc () {.noconv.}) = discard
|
|||
|
||||
proc closureIterSetupExc(e: ref Exception) {.compilerproc, inline.} =
|
||||
sysFatal(ReraiseDefect, "exception handling is not available")
|
||||
|
||||
when gotoBasedExceptions:
|
||||
var nimInErrorMode {.threadvar.}: bool
|
||||
|
||||
proc nimErrorFlag(): ptr bool {.compilerRtl, inl.} =
|
||||
result = addr(nimInErrorMode)
|
||||
|
||||
proc nimTestErrorFlag() {.compilerRtl.} =
|
||||
if nimInErrorMode:
|
||||
sysFatal(ReraiseDefect, "exception handling is not available")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue