Fixed rethrowing not to generate C++ throw with noCppExceptions switch

This commit is contained in:
Ruslan Mustakov
2016-06-14 13:05:28 +06:00
parent 93424420d4
commit a648d06ba8

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