y3c-stl 0.3.3
Friendly C++ STL wrapper with automatic stacktrace
Loading...
Searching...
No Matches
exception_base Class Reference

y3cの例外クラスのベース。 More...

#include <y3c/terminate.h>

Inheritance diagram for exception_base:
[legend]

Public Member Functions

 exception_base (const char *e_class, std::string &&func, std::string &&what, skip_trace_tag={})
 
 exception_base (const exception_base &)=delete
 
exception_baseoperator= (const exception_base &)=delete
 
 exception_base (exception_base &&other)
 
exception_baseoperator= (exception_base &&)=delete
 
 ~exception_base ()
 

Static Public Attributes

static std::atomic< int > last_exception_id
 
static std::unordered_map< int, terminate_detailexceptions
 

Protected Attributes

std::string what
 

Detailed Description

y3cの例外クラスのベース。

スタックトレースや例外の詳細をコンストラクタでstatic変数に保存し、 what() は通常の例外と同様短いメッセージを返す。

Constructor & Destructor Documentation

◆ exception_base() [1/3]

exception_base ( const char *  e_class,
std::string &&  func,
std::string &&  what,
skip_trace_tag  = {} 
)
inline

◆ exception_base() [2/3]

exception_base ( const exception_base )
delete

◆ exception_base() [3/3]

exception_base ( exception_base &&  other)
inline

◆ ~exception_base()

~exception_base ( )
inline

Member Function Documentation

◆ operator=() [1/2]

exception_base & operator= ( const exception_base )
delete

◆ operator=() [2/2]

exception_base & operator= ( exception_base &&  )
delete

Member Data Documentation

◆ exceptions

std::unordered_map< int, terminate_detail > exceptions
static

◆ last_exception_id

std::atomic< int > last_exception_id
static

◆ what

std::string what
protected

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