21#ifndef G_NET_EXCEPTION_SINK_H
22#define G_NET_EXCEPTION_SINK_H
33 class ExceptionSinkUnbound ;
129 void call( std::exception & e ,
bool done ) ;
135 void reset() noexcept ;
138 bool set() const noexcept ;
An abstract interface for handling exceptions thrown out of event-loop callbacks (socket/future event...
A potential ExceptionSink that is realised by bind()ing an exception source pointer.
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.
ExceptionSink(std::nullptr_t, ExceptionSource *)=delete
Deleted override to prohibit a null ExceptionHandler.
A mixin base class that identifies the source of an exception when delivered to GNet::ExceptionHandle...