Sha256: dd20959160f39c278bd24b8a46a84bc9732d20a7a22007880ef3f7b2b3ecc7da

Contents?: true

Size: 1.29 KB

Versions: 35

Compression:

Stored size: 1.29 KB

Contents

#include "../Data_Type_defn.hpp"

inline
Rice::detail::Exception_Handler::
Exception_Handler(
    Data_Object<Exception_Handler> next_exception_handler)
  : next_exception_handler_(next_exception_handler)
  , next_exception_handler_guard_(&next_exception_handler_)
{
}

inline
Rice::detail::Exception_Handler::
~Exception_Handler()
{
}

inline
VALUE
Rice::detail::Exception_Handler::
call_next_exception_handler() const
{
  return next_exception_handler_->handle_exception();
}

inline Rice::detail::Default_Exception_Handler::
Default_Exception_Handler()
  : Exception_Handler(
      Data_Object<Exception_Handler>(0, rb_cObject))
{
}

inline
VALUE
Rice::detail::Default_Exception_Handler::
handle_exception() const
{
  throw;
}

template <typename Exception_T, typename Functor_T>
inline
Rice::detail::Functor_Exception_Handler<Exception_T, Functor_T>::
Functor_Exception_Handler(
    Functor_T handler,
    Data_Object<Exception_Handler> next_exception_handler)
  : Exception_Handler(next_exception_handler)
  , handler_(handler)
{
}

template <typename Exception_T, typename Functor_T>
inline
VALUE
Rice::detail::Functor_Exception_Handler<Exception_T, Functor_T>::
handle_exception() const
{
  try
  {
    return call_next_exception_handler();
  }
  catch(Exception_T const & ex)
  {
    handler_(ex);
    throw;
  }
}

Version data entries

35 entries across 35 versions & 6 rubygems

Version Path
rice-3.0.0 rice/detail/Exception_Handler.ipp
rice2-2.2.1 rice/detail/Exception_Handler.ipp
rice2-2.2.0 rice/detail/Exception_Handler.ipp
rice-2.2.0 rice/detail/Exception_Handler.ipp
rice-2.1.3 rice/detail/Exception_Handler.ipp
rice-2.1.2 rice/detail/Exception_Handler.ipp
rice-2.1.1 rice/detail/Exception_Handler.ipp
rice-2.1.0 rice/detail/Exception_Handler.ipp
rice-2.0.0 rice/detail/Exception_Handler.ipp
rice-1.7.0 rice/detail/Exception_Handler.ipp
rice-1.6.3 rice/detail/Exception_Handler.ipp
jameskilton-rice-1.2.0 rice/detail/Exception_Handler.ipp
rice-1.6.2 rice/detail/Exception_Handler.ipp
rice-1.6.1 rice/detail/Exception_Handler.ipp
rice-1.6.0 rice/detail/Exception_Handler.ipp
rice-1.6.0.pre rice/detail/Exception_Handler.ipp
rice-1.5.3 rice/detail/Exception_Handler.ipp
rice-1.5.2 rice/detail/Exception_Handler.ipp
keyme-rice-1.5.1.keyme1 rice/detail/Exception_Handler.ipp
keyme-rice-1.5.1.keyme rice/detail/Exception_Handler.ipp