Merge pull request #4331 from endragor/no-cpp-exceptions-rethrow

Fixed rethrowing not to generate C++ throw with noCppExceptions switch
This commit is contained in:
Andreas Rumpf
2016-06-14 09:39:10 +02:00
committed by GitHub

View File

@@ -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")