|
CIRCT 23.0.0git
|
Cross-thread error channel for the IXWebSocket network thread. More...
#include <RpcWire.h>

Public Member Functions | |
| void | record (std::exception_ptr ep) noexcept |
| Stash the first exception we see (subsequent ones are dropped – the first is the most informative). | |
| void | check () |
| Consume and rethrow the stored fault on the caller's thread, if any. | |
Private Attributes | |
| std::mutex | mutex |
| std::exception_ptr | fault |
Cross-thread error channel for the IXWebSocket network thread.
IXWebSocket invokes user callbacks from its internal network thread; any exception escaping that callback kills the process. Call sites catch and record() the first fault; the next public method on the owning RpcServer/RpcClient calls check(), which consumes the stash and rethrows on the user's thread.
|
inline |
Consume and rethrow the stored fault on the caller's thread, if any.
Definition at line 80 of file RpcWire.h.
Referenced by esi::cosim::RpcServer::Impl::registerReadPort(), esi::cosim::RpcServer::Impl::registerWritePort(), esi::cosim::RpcServer::Impl::setManifest(), and esi::cosim::RpcServer::Impl::stop().
|
inlinenoexcept |
Stash the first exception we see (subsequent ones are dropped – the first is the most informative).
Safe to call from any thread.
Definition at line 73 of file RpcWire.h.
Referenced by esi::cosim::RpcServer::Impl::handleControlFrame(), and esi::cosim::RpcServer::Impl::onClientMessage().
|
private |
|
private |