From a648d06ba815bd095db2a23e2cfcc40fe8653887 Mon Sep 17 00:00:00 2001 From: Ruslan Mustakov Date: Tue, 14 Jun 2016 13:05:28 +0600 Subject: [PATCH] Fixed rethrowing not to generate C++ throw with noCppExceptions switch --- compiler/ccgstmts.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")