MkExceptionC - the final class to connect the MkErrorC with the C++
error …
More...
|
| ccmkkernel::MkExceptionC::MkExceptionC (MK_ERR err, MK_STRN const caller, MK_I32 const line) |
| constructor
|
|
| ccmkkernel::MkExceptionC::MkExceptionC (MK_MNGN const mng, MK_STRN const caller, MK_I32 const line) |
| constructor
|
|
| ccmkkernel::MkExceptionC::MkExceptionC (const MkExceptionC &e) |
| copy constructor
|
|
virtual | ccmkkernel::MkExceptionC::~MkExceptionC () throw () |
| destructor
|
|
virtual MK_STRN | ccmkkernel::MkExceptionC::what () const throw () |
| Returns the explanatory string.
|
|
void | ccmkkernel::MkExceptionC::Log (MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION(), MK_I32 lvl=0) const |
| log the error to MkLogFileC (default: stderr) … → C-API: ErrorLog
|
|
static void | ccmkkernel::MkExceptionC::Raise (MK_MNGN const expobj, MK_STRN const callfunc=__builtin_FUNCTION(), MK_I32 const callline=__builtin_LINE()) |
| convert an MkErrorC into a Target-Programming-Language (TPL) exception … → C-API: libmkkernel::MkExceptionRaise
|
|
static MK_ERR | ccmkkernel::MkExceptionC::Catch (MK_MNGN const expobj, std::exception const *exception, MK_STRN const callfunc=__builtin_FUNCTION()) |
| convert an Target-Programming-Language (TPL) exception into an MkErrorC … → C-API: libmkkernel::MkExceptionCatch
|
|
static MK_ERR | ccmkkernel::MkExceptionC::Catch (MK_MNGN const expobj, std::exception const &exception, MK_STRN const callfunc=__builtin_FUNCTION()) |
| convert an Target-Programming-Language (TPL) exception into an MkErrorC … → C-API: libmkkernel::MkExceptionCatch
|
|
static MK_ERR | ccmkkernel::MkExceptionC::Catch (MK_MNGN const expobj, const std::string &msg, MK_STRN const callfunc=__builtin_FUNCTION()) |
| convert an Target-Programming-Language (TPL) exception into an MkErrorC … → C-API: libmkkernel::MkExceptionCatch
|
|
MkExceptionC - the final class to connect the MkErrorC with the C++
error …
MkExceptionC - The default-exception of the Programming-Language-Micro-Kernel (PLMK) …
The Programming-Language-Micro-Kernel (PLMK) provide with MkErrorC a complete error-handling with focus to support the "C"
Programming-Language. The support include catch, raise, signal and attributes. In addition every Target-Programming-Language (TPL) add their own error-handling and the purpose of MkExceptionC is to integrate the MkErrorC into the Target-Programming-Language (TPL).
The default-exception MkExceptionC is used to connect the MkErrorC with the Target-Programming-Language (TPL) error-object.
The implementation of an exception depends heavily on the Target-Programming-Language (TPL), starting with no exception at all, for example. C
, an exception as a class object, or as an exception as a global attribute.
- Attention
-
◆ Catch() [1/3]
MK_ERR ccmkkernel::MkExceptionC::Catch |
( |
MK_MNGN const | expobj, |
|
|
const std::string & | msg, |
|
|
MK_STRN const | callfunc = __builtin_FUNCTION() ) |
|
static |
◆ Catch() [2/3]
static MK_ERR ccmkkernel::MkExceptionC::Catch |
( |
MK_MNGN const | expobj, |
|
|
std::exception const & | exception, |
|
|
MK_STRN const | callfunc = __builtin_FUNCTION() ) |
|
inlinestatic |
◆ Catch() [3/3]
MK_ERR ccmkkernel::MkExceptionC::Catch |
( |
MK_MNGN const | expobj, |
|
|
std::exception const * | exception, |
|
|
MK_STRN const | callfunc = __builtin_FUNCTION() ) |
|
static |
convert an Target-Programming-Language (TPL) exception into an MkErrorC … → C-API: libmkkernel::MkExceptionCatch
Definition at line 65 of file MkExceptionC_cc.cc.
66 {
67 std::stringstream ss;
70
71 auto* mqex =
dynamic_cast<MkExceptionC const * const
>(ex);
72 if (mqex != NULL) {
74 return err ;
75 }
76 auto* krex = dynamic_cast<MkKernelException const * const>(ex);
77 if (krex != NULL) {
80 return err ;
81 }
82
84 return err;
85 }
#define MkErrorStackFormat(...)
MkExceptionC(MK_ERR err, MK_STRN const caller, MK_I32 const line)
constructor
◆ Log()
void ccmkkernel::MkExceptionC::Log |
( |
MK_DBG | debug = 0, |
|
|
MK_STRN | callfunc = __builtin_FUNCTION(), |
|
|
MK_I32 | lvl = 0 ) const |
|
inline |
◆ MkExceptionC() [1/3]
ccmkkernel::MkExceptionC::MkExceptionC |
( |
const MkExceptionC & | e | ) |
|
◆ MkExceptionC() [2/3]
constructor
Definition at line 42 of file MkExceptionC_cc.cc.
42 {
46
49 }
#define MkErrorReset(...)
◆ MkExceptionC() [3/3]
ccmkkernel::MkExceptionC::MkExceptionC |
( |
MK_MNGN const | mng, |
|
|
MK_STRN const | caller, |
|
|
MK_I32 const | line ) |
|
protected |
◆ Raise()
void ccmkkernel::MkExceptionC::Raise |
( |
MK_MNGN const | expobj, |
|
|
MK_STRN const | callfunc = __builtin_FUNCTION(), |
|
|
MK_I32 const | callline = __builtin_LINE() ) |
|
static |
◆ what()
virtual MK_STRN ccmkkernel::MkExceptionC::what |
( |
| ) |
const |
throw | ( | ) | | | |
|
inlinevirtual |
Returns the explanatory string.
- Returns
- Pointer to a null-terminated string with explanatory information. The pointer is guaranteed to be valid at least until the exception object from which it is obtained is destroyed, or until a non-const member function on the exception object is called.
Definition at line 58 of file MkExceptionC_cc.hh.
58 {
60 }
#define MkBUF_R(x)
cast a known-object into an MkBufferS reference
struct MkBuffer1024S text
the error message
◆ ~MkExceptionC()
ccmkkernel::MkExceptionC::~MkExceptionC |
( |
| ) |
|
throw | ( | ) | | | |
|
virtual |
◆ hdl
MK_ERR ccmkkernel::MkExceptionC::hdl |
|
protected |