Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
fc::exception_factory Class Reference

#include <exception.hpp>

Classes

struct  base_exception_builder
 
struct  exception_builder
 

Public Member Functions

template<typename T >
void register_exception ()
 
void NO_RETURN rethrow (const exception &e) const
 

Static Public Member Functions

static exception_factoryinstance ()
 

Detailed Description

Definition at line 210 of file exception.hpp.

Member Function Documentation

◆ instance()

static exception_factory & fc::exception_factory::instance ( )
inlinestatic

Definition at line 239 of file exception.hpp.

240 {
241 static exception_factory once;
242 return once;
243 }
Here is the caller graph for this function:

◆ register_exception()

template<typename T >
void fc::exception_factory::register_exception ( )
inline

Definition at line 228 of file exception.hpp.

229 {
230 static exception_builder<T> builder;
231 auto itr = _registered_exceptions.find( T::code_value );
232 assert( itr == _registered_exceptions.end() );
233 (void)itr; // in release builds this hides warnings
234 _registered_exceptions[T::code_value] = &builder;
235 }

◆ rethrow()

void NO_RETURN fc::exception_factory::rethrow ( const exception & e) const

Definition at line 247 of file exception.cpp.

248 {
249 auto itr = _registered_exceptions.find( e.code() );
250 if( itr != _registered_exceptions.end() )
251 itr->second->rethrow( e );
252 throw e;
253 }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: