libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::exception< API, Mdl > Class Template Reference

#include <exception.hpp>

Inheritance diagram for jmmcg::LIBJMMCG_VER_NAMESPACE::exception< API, Mdl >:
[legend]

Public Types

typedef std::runtime_error base_t
 
typedef ppd::api_threading_traits< API, Mdl > thread_traits
 
typedef thread_traits::lock_traits lock_traits
 

Public Member Functions

 exception (tstring &&r, info::function &&f, info::revision &&ri) noexcept(false)
 
 exception (const tostringstream &r, info::function &&f, info::revision &&ri) noexcept(false)
 
 exception (const exception &ex) noexcept(false)
 
void operator= (exception const &)=delete
 
void operator= (exception &&)=delete
 
virtual ~exception () noexcept(true)
 
virtual exit_codes::codes __fastcall code () const noexcept(true)
 
char const *__CLR_OR_THIS_CALL what () const noexcept(true) final override
 
virtual const tstring __fastcall to_string () const noexcept(false)
 

Static Public Member Functions

static constexpr std::size_t max_size () noexcept(true)
 

Protected Attributes

const thread_traits::api_params_type::pid_type process_id
 
const thread_traits::api_params_type::tid_type thread_id
 
const thread_traits::api_params_type::username_type current_username
 

Friends

tostream &__fastcall operator<< (tostream &o, const exception &e) noexcept(false)
 

Detailed Description

template<ppd::generic_traits::api_type API, typename Mdl>
class jmmcg::LIBJMMCG_VER_NAMESPACE::exception< API, Mdl >

Inheritance from "std::runtime_error" is done in case of object slicing (which can occur with exceptions) so I set the error string in the exception as best I can. Note that for derived exception classes, the error string held n "std::exception" may not have everything in it compared to the overrriden "what()". But it is better than sweet f.a.

Definition at line 62 of file exception.hpp.

Member Typedef Documentation

◆ base_t

template<ppd::generic_traits::api_type API, typename Mdl >
typedef std::runtime_error jmmcg::LIBJMMCG_VER_NAMESPACE::exception< API, Mdl >::base_t

Definition at line 64 of file exception.hpp.

◆ lock_traits

Definition at line 66 of file exception.hpp.

◆ thread_traits

Definition at line 65 of file exception.hpp.

Constructor & Destructor Documentation

◆ exception() [1/3]

◆ exception() [2/3]

◆ exception() [3/3]

◆ ~exception()

template<ppd::generic_traits::api_type API, typename Mdl >
virtual jmmcg::LIBJMMCG_VER_NAMESPACE::exception< API, Mdl >::~exception ( )
inlinevirtualnoexcept

Definition at line 73 of file exception.hpp.

Member Function Documentation

◆ code()

◆ max_size()

template<ppd::generic_traits::api_type API, typename Mdl >
static constexpr std::size_t jmmcg::LIBJMMCG_VER_NAMESPACE::exception< API, Mdl >::max_size ( )
inlinestaticconstexprnoexcept

◆ operator=() [1/2]

template<ppd::generic_traits::api_type API, typename Mdl >
void jmmcg::LIBJMMCG_VER_NAMESPACE::exception< API, Mdl >::operator= ( exception< API, Mdl > &&  )
delete

◆ operator=() [2/2]

template<ppd::generic_traits::api_type API, typename Mdl >
void jmmcg::LIBJMMCG_VER_NAMESPACE::exception< API, Mdl >::operator= ( exception< API, Mdl > const &  )
delete

◆ to_string()

◆ what()

template<ppd::generic_traits::api_type API, typename Mdl >
NEVER_INLINE char const *__CLR_OR_THIS_CALL jmmcg::LIBJMMCG_VER_NAMESPACE::exception< API, Mdl >::what
inlinefinaloverridenoexcept

Definition at line 67 of file exception_impl.hpp.

Friends And Related Function Documentation

◆ operator<<

template<ppd::generic_traits::api_type API, typename Mdl >
tostream& __fastcall operator<< ( tostream o,
const exception< API, Mdl > &  e 
)
friend
Todo:
Implement using the advice given in "Standard C++ IOStreams and Locales" by A.Langer & K.Kreft, page 170.

Definition at line 97 of file exception.hpp.

Member Data Documentation

◆ current_username

◆ process_id

◆ thread_id


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