Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85777 - trunk/boost/msm/back
From: christophe.j.henry_at_[hidden]
Date: 2013-09-18 15:42:22


Author: chenry
Date: 2013-09-18 15:42:22 EDT (Wed, 18 Sep 2013)
New Revision: 85777
URL: http://svn.boost.org/trac/boost/changeset/85777

Log:
Applied patch from trac 8686

Text files modified:
   trunk/boost/msm/back/state_machine.hpp | 11 ++++++++---
   1 files changed, 8 insertions(+), 3 deletions(-)

Modified: trunk/boost/msm/back/state_machine.hpp
==============================================================================
--- trunk/boost/msm/back/state_machine.hpp Wed Sep 18 09:04:51 2013 (r85776)
+++ trunk/boost/msm/back/state_machine.hpp 2013-09-18 15:42:22 EDT (Wed, 18 Sep 2013) (r85777)
@@ -1732,15 +1732,20 @@
     template <class StateType,class EventType>
     HandledEnum do_process_helper(EventType const& evt, ::boost::mpl::false_ const &, bool is_direct_call)
     {
- try
+ // when compiling without exception support there is no formal parameter "e" in the catch handler.
+ // Declaring a local variable here does not hurt and will be "used" to make the code in the handler
+ // compilable although the code will never be executed.
+ std::exception e;
+ BOOST_TRY
         {
             return this->do_process_event(evt,is_direct_call);
         }
- catch (std::exception& e)
+ BOOST_CATCH (std::exception& e)
         {
             // give a chance to the concrete state machine to handle
             this->exception_caught(evt,*this,e);
- }
+ }
+ BOOST_CATCH_END
         return HANDLED_FALSE;
     }
     // handling of deferred events


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk