From ce2b56751b469c25ddb54fe9485d9dfa2b1afd55 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Wed, 24 Apr 2013 15:25:59 -0500 Subject: [PATCH] binpac: Fix an exception slicing issue in binpac generated cleanup code. Switch to using a no-argument throw to preserve the dynamic type of the binpac exception. Otherwise, the exception is "sliced" and can only be subsequently handled as binpac::Exception and not a derived type. --- tools/binpac/src/pac_flow.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/binpac/src/pac_flow.cc b/tools/binpac/src/pac_flow.cc index f7710a9c0c..c92a8c93cc 100644 --- a/tools/binpac/src/pac_flow.cc +++ b/tools/binpac/src/pac_flow.cc @@ -235,7 +235,7 @@ void FlowDecl::GenProcessFunc(Output *out_h, Output *out_cc) out_cc->println("%s->DiscardData();", env_->LValue(flow_buffer_id)); } - out_cc->println("throw e;"); + out_cc->println("throw;"); out_cc->println("}"); out_cc->dec_indent();