29 namespace ExceptionSinkImp
37 } rethrow_exception_handler ;
42 m_eh(type==Type::Null?
nullptr:&ExceptionSinkImp::rethrow_exception_handler)
72 m_eh->onException( m_esrc , e , done ) ;
84 return m_eh != nullptr ;
97 G_ASSERT( eh !=
nullptr ) ;
An abstract interface for handling exceptions thrown out of event-loop callbacks (socket/future event...
ExceptionSinkUnbound(ExceptionHandler *eh)
Constructor.
ExceptionSink bind(ExceptionSource *source) const
Returns a sink object with the source pointer set.
A tuple containing an ExceptionHandler interface pointer and a bound 'exception source' pointer.
ExceptionHandler * eh() const noexcept
Returns the exception handler pointer.
ExceptionSource * esrc() const noexcept
Returns the exception source pointer.
ExceptionSink(Type=Type::Rethrow, ExceptionSource *source=nullptr) noexcept
Constructor.
void call(std::exception &e, bool done)
Calls the exception handler's onException() method.
void reset() noexcept
Resets the pointers.
bool set() const noexcept
Returns true if eh() is not null.
A mixin base class that identifies the source of an exception when delivered to GNet::ExceptionHandle...
An GNet::ExceptionHandler that rethrows.
void onException(GNet::ExceptionSource *, std::exception &, bool) override
Called by the event loop when an exception is thrown out of an event loop callback.