diff --git a/compiler/ccgstmts.nim b/compiler/ccgstmts.nim index 61412ad67a..64933df781 100644 --- a/compiler/ccgstmts.nim +++ b/compiler/ccgstmts.nim @@ -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")