Go to the source code of this file.
|
#define | SWC_EXCEPTION(_code_, _msg_) |
|
#define | SWC_EXCEPTION2(_code_, _ex_, _msg_) |
|
#define | SWC_CURRENT_EXCEPTION(_msg_) ::SWC::Error::Exception::make(std::current_exception(), _msg_) |
|
#define | SWC_THROW(_code_, _msg_) throw SWC_EXCEPTION(_code_, _msg_) |
|
#define | SWC_THROWF(_code_, _fmt_, ...) throw SWC_EXCEPTION(_code_, ::SWC::format(_fmt_, __VA_ARGS__)) |
|
#define | SWC_THROW2F(_code_, _ex_, _fmt_, ...) throw SWC_EXCEPTION2(_code_, _ex_, ::SWC::format(_fmt_, __VA_ARGS__)) |
|
#define | SWC_LOG_CURRENT_EXCEPTION(_s_) |
|
#define | SWC_TRY(_s_, _code_) try { _code_ } catch(...) { throw SWC_CURRENT_EXCEPTION(_s_); } |
|
#define | SWC_TRY_OR_LOG(_s_, _code_) try { _code_ } catch(...) { SWC_LOG_CURRENT_EXCEPTION(_s_); } |
|
#define | SWC_EXPECT(_e_, _code_) |
|
#define | SWC_ASSERT(_e_) SWC_EXPECT(_e_, ::SWC::Error::FAILED_EXPECTATION) |
|
#define | SWC_EXPECTF(_e_, _code_, _fmt_, ...) |
|
#define | SWC_ASSERTF(_e_, _fmt_, ...) SWC_EXPECTF(_e_, ::SWC::Error::FAILED_EXPECTATION, _fmt_, __VA_ARGS__) |
|
◆ SWC_ASSERT
◆ SWC_ASSERTF
◆ SWC_CURRENT_EXCEPTION
◆ SWC_EXCEPTION
#define SWC_EXCEPTION |
( |
|
_code_, |
|
|
|
_msg_ |
|
) |
| |
Value:
_code_, _msg_, nullptr, __LINE__, __PRETTY_FUNCTION__, __FILE__)
Definition at line 110 of file Exception.h.
◆ SWC_EXCEPTION2
#define SWC_EXCEPTION2 |
( |
|
_code_, |
|
|
|
_ex_, |
|
|
|
_msg_ |
|
) |
| |
Value:
_code_, _msg_, &_ex_, __LINE__, __PRETTY_FUNCTION__, __FILE__)
Definition at line 114 of file Exception.h.
◆ SWC_EXPECT
#define SWC_EXPECT |
( |
|
_e_, |
|
|
|
_code_ |
|
) |
| |
Value: if (!(_e_)) { \
SWC_LOG_FATAL("failed expectation: " #_e_); \
SWC_THROW(_code_, "failed expectation: " #_e_); \
}
Definition at line 158 of file Exception.h.
◆ SWC_EXPECTF
#define SWC_EXPECTF |
( |
|
_e_, |
|
|
|
_code_, |
|
|
|
_fmt_, |
|
|
|
... |
|
) |
| |
Value: if (!(_e_)) { \
SWC_LOG_FATALF(_fmt_, __VA_ARGS__); \
SWC_THROWF(_code_, _fmt_, __VA_ARGS__); \
}
Definition at line 168 of file Exception.h.
◆ SWC_LOG_CURRENT_EXCEPTION
#define SWC_LOG_CURRENT_EXCEPTION |
( |
|
_s_ | ) |
|
◆ SWC_THROW
#define SWC_THROW |
( |
|
_code_, |
|
|
|
_msg_ |
|
) |
| throw SWC_EXCEPTION(_code_, _msg_) |
◆ SWC_THROW2F
◆ SWC_THROWF
◆ SWC_TRY
◆ SWC_TRY_OR_LOG