Ticket #8686: state_machine.patch

File state_machine.patch, 1.1 KB (added by Norbert Riedlin <norbert.riedlin@…>, 9 years ago)
  • state_machine.hpp

     
    17321732    template <class StateType,class EventType>
    17331733    HandledEnum do_process_helper(EventType const& evt, ::boost::mpl::false_ const &, bool is_direct_call)
    17341734    {
    1735         try
     1735        // when compiling without exception support there is no formal parameter "e" in the catch handler.
     1736        //  Declaring a local variable here does not hurt and will be "used" to make the code in the handler
     1737        // compilable although the code will never be executed.
     1738        std::exception e;
     1739        BOOST_TRY
    17361740        {
    17371741            return this->do_process_event(evt,is_direct_call);
    17381742        }
    1739         catch (std::exception& e)
     1743        BOOST_CATCH (std::exception& e)
    17401744        {
    17411745            // give a chance to the concrete state machine to handle
    17421746            this->exception_caught(evt,*this,e);
    1743         }
     1747        }
     1748        BOOST_CATCH_END
     1749
    17441750        return HANDLED_FALSE;
    17451751    }
    17461752    // handling of deferred events