mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-17 16:38:33 +00:00
Fixed rethrowing not to generate C++ throw with noCppExceptions switch
This commit is contained in:
@@ -570,7 +570,7 @@ proc genRaiseStmt(p: BProc, t: PNode) =
|
||||
else:
|
||||
genLineDir(p, t)
|
||||
# reraise the last exception:
|
||||
if p.module.compileToCpp:
|
||||
if p.module.compileToCpp and optNoCppExceptions notin gGlobalOptions:
|
||||
line(p, cpsStmts, ~"throw;$n")
|
||||
else:
|
||||
linefmt(p, cpsStmts, "#reraiseException();$n")
|
||||
|
||||
Reference in New Issue
Block a user