pars 0.2.1
Loading...
Searching...
No Matches
pars::ev::exception Struct Reference

#include <event.h>

Public Member Functions

std::string str () const
 
auto format_to (std::format_context &ctx) const -> decltype(ctx.out())
 

Public Attributes

std::exception_ptr eptr
 

Detailed Description

Definition at line 110 of file event.h.

Member Function Documentation

◆ format_to()

auto pars::ev::exception::format_to ( std::format_context & ctx) const -> decltype(ctx.out())
inline

Definition at line 135 of file event.h.

136 {
137 return std::format_to(ctx.out(), "{}", str());
138 }
clev::own< nng_ctx > ctx
Definition ctx.h:39
std::string str() const
Definition event.h:114

References str().

Here is the call graph for this function:

◆ str()

std::string pars::ev::exception::str ( ) const
inline

Definition at line 114 of file event.h.

115 {
116 try
117 {
118 std::rethrow_exception(eptr);
119 }
120 catch (clev::exception& e)
121 {
122 return std::format("{}", e.what());
123 }
124 catch (std::exception& e)
125 {
126 return std::format("{}", e.what());
127 }
128 catch (...)
129 {
130 return "Unknown!";
131 }
132 return "<empty-exception>";
133 }
std::exception_ptr eptr
Definition event.h:112

References eptr.

Referenced by format_to().

Here is the caller graph for this function:

Member Data Documentation

◆ eptr

std::exception_ptr pars::ev::exception::eptr

Definition at line 112 of file event.h.

Referenced by str().


The documentation for this struct was generated from the following file: