MkErrorC - the class known as err or error is used to create and manage an error message … More...
Topics | |
MkErrorC_TOR_CC_API | |
MkErrorC - various functions to 'create' and 'delete' a MkErrorS … | |
MkErrorC_System_CC_API | |
MkErrorC - various functions to raise a 'System' messagen on MkErrorS … | |
MkErrorC_Signal_CC_API | |
MkErrorC - various functions to set and check a 'signal' on a MkErrorS … | |
MkErrorC_Get_CC_API | |
MkErrorC - various functions to 'get' data out of a MkErrorS … | |
MkErrorC_Raise_CC_API | |
MkErrorC - various functions to 'raise' a MkErrorS … | |
MkErrorC_Misc_CC_API | |
MkErrorC - various functions to 'work' on a MkErrorS … | |
MkErrorC_Introspection_CC_API | |
MkErrorC_Class_CC_API | |
MkErrorC - define the class … | |
Classes | |
struct | ccmkkernel::MkErrorC_A |
The data-type to store and handle the error-condition … → C-API: libmkkernel::MkErrorS More... | |
class | ccmkkernel::MkErrorC |
The data-type to store and handle the error-condition … → C-API: libmkkernel::MkErrorS More... | |
Functions | |
ccmkkernel::MkErrorC::MkErrorC (MK_ERR hdl) | |
static MkErrorC * | ccmkkernel::MkErrorC::MkErrorC_ObjNew (MK_RT_ARGS MK_ERR hdl) |
return MkErrorC from LibMsgqueObject | |
MK_ERR | ccmkkernel::MkErrorC::getERR () const |
return the LibMsgqueObject from current MkErrorC instance | |
MK_ERR | ccmkkernel::MkErrorC::getERR__null_allow () const |
return the LibMsgqueObject from current MkErrorC instance | |
MK_ERRN | ccmkkernel::MkErrorC::getERRN () const |
(const) return the LibMsgqueObject from current MkErrorC instance | |
MK_ERRN | ccmkkernel::MkErrorC::getERRN__null_allow () const |
(const) return the LibMsgqueObject from current MkErrorC instance | |
static MK_ERR | ccmkkernel::MkErrorC::getERR (MkErrorC *clsHdl) |
return LibMsgqueObject from current MkErrorC pointer | |
static MK_ERR | ccmkkernel::MkErrorC::getERR__null_allow (MkErrorC *clsHdl) |
return LibMsgqueObject from current MkErrorC pointer | |
static MK_ERRN | ccmkkernel::MkErrorC::getERRN (const MkErrorC *clsHdl) |
(const) return LibMsgqueObject from current MkErrorC pointer | |
static MK_ERRN | ccmkkernel::MkErrorC::getERRN__null_allow (const MkErrorC *clsHdl) |
(const) return LibMsgqueObject from current MkErrorC pointer | |
static MK_ERR | ccmkkernel::MkErrorC::getERR (const MkErrorC &clsHdl) |
return LibMsgqueObject from current MkErrorC reference | |
static MK_ERR | ccmkkernel::MkErrorC::getERR__null_allow (const MkErrorC &clsHdl) |
return LibMsgqueObject from current MkErrorC reference | |
static MK_ERRN | ccmkkernel::MkErrorC::getERRN (const MkErrorC &clsHdl) |
(const) return LibMsgqueObject from current MkErrorC reference | |
static MK_ERRN | ccmkkernel::MkErrorC::getERRN__null_allow (const MkErrorC &clsHdl) |
(const) return LibMsgqueObject from current MkErrorC reference | |
bool | ccmkkernel::MkErrorC::Check () const |
check if pointer is still valid | |
ccmkkernel::MkErrorC::MkErrorC (const MkErrorC &e) | |
ccmkkernel::MkErrorC::MkErrorC (const MkExceptionC &ex) | |
static void | ccmkkernel::MkErrorC::Check (MK_MNGN mng, enum MkErrorE err) |
static void | ccmkkernel::MkErrorC::Check (enum MkErrorE err) |
static MkErrorC * | ccmkkernel::MkErrorC::FORMAT (MK_OBJ const fmtobj) |
static bool | ccmkkernel::MkErrorC::IsEXIT_DEFAULT () |
static bool | ccmkkernel::MkErrorC::IsSOCKET_DEFAULT () |
Variables | |
static thread_local MkErrorC | ccmkkernel::MkErrorC::MK_NULL_REF = {(MK_OBJ)0} |
#define | ErrorCC(errnum, message) |
customized edition of ErrorSetV … | |
MkErrorC - the class known as err or error is used to create and manage an error message …
An error is a singleton object per thread created at startup and is located at MkRuntimeRLS using the datatype MkErrorC.
As error-indicator the enum libmkkernel::MkErrorE is used.
The MkErrorC is used to collect all data needed to handle an error and provide global ressources required to process and report the error.
The MkErrorC is also used to integrate the error-handling from ccmkkernel into the error-handling-code of the target C++.
Example from Filter6.cc
→ use MqContextErrorCatch to convert a C++ error into a ccmkkernel error
int MK_CDECL main (int argc, MK_STRN argv[]) { MqMsgque::CcMqSetup(); // define factory auto Filter6F = MqFactoryCT<Filter6>::Add("Filter6"); // modify default type Filter6F->Type()->fHelp = Filter6::Help; // create object from factory Filter6 *filter = Filter6F->New(); try { filter->LinkCreate (MkBufferListC {argc, argv}); filter->ProcessEvent (MQ_WAIT_FOREVER); } catch (const exception& e) { filter->ErrorCatch(e); } return filter->Exit(); }
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.
Checks if Exception is of type MkExceptionC and returns true
or false
…
Example: test case to check KILL and RECOVER feature, check on MkExceptionC
MK_I32 PID, RET=0; auto VAL = ReadBUF(); Client cl; cl.LinkCreate(ConfigGetStartAs()); cl.Send("W","GPID@I", &PID); SysKill(PID,9); for (int i = 0; i < 3; i++) { try { cl.Send("W","ECOI:U@I", VAL, &RET); } catch (const MkExceptionC &ex) { auto err = cl.ErrorCatch(ex); if (err->IsSOCKET()) { err->Reset(); cl.LinkConnect(); continue; } else { err->Raise(); } } break; } SendSTART(); SendI32(RET);
true
or false
[in] | exception | the exception object from C++, if MK_NULL the global exception object is used |
#define ErrorCC | ( | errnum, | |
message ) |
customized edition of ErrorSetV …
Definition at line 268 of file MkObjectC_cc.hh.
|
inline |
check if pointer is still valid
Definition at line 150 of file MkErrorC_cc.hh.
|
inlinestatic |
Definition at line 171 of file MkErrorC_cc.hh.
Definition at line 167 of file MkErrorC_cc.hh.
Definition at line 27 of file MkErrorC_inline_cc.hh.
|
inline |
return the LibMsgqueObject from current MkErrorC instance
Definition at line 82 of file MkErrorC_cc.hh.
return LibMsgqueObject from current MkErrorC reference
Definition at line 130 of file MkErrorC_cc.hh.
return LibMsgqueObject from current MkErrorC pointer
Definition at line 106 of file MkErrorC_cc.hh.
|
inline |
return the LibMsgqueObject from current MkErrorC instance
Definition at line 89 of file MkErrorC_cc.hh.
return LibMsgqueObject from current MkErrorC reference
Definition at line 135 of file MkErrorC_cc.hh.
return LibMsgqueObject from current MkErrorC pointer
Definition at line 113 of file MkErrorC_cc.hh.
|
inline |
(const) return the LibMsgqueObject from current MkErrorC instance
Definition at line 94 of file MkErrorC_cc.hh.
(const) return LibMsgqueObject from current MkErrorC reference
Definition at line 140 of file MkErrorC_cc.hh.
(const) return LibMsgqueObject from current MkErrorC pointer
Definition at line 118 of file MkErrorC_cc.hh.
|
inline |
(const) return the LibMsgqueObject from current MkErrorC instance
Definition at line 101 of file MkErrorC_cc.hh.
(const) return LibMsgqueObject from current MkErrorC reference
Definition at line 145 of file MkErrorC_cc.hh.
(const) return LibMsgqueObject from current MkErrorC pointer
Definition at line 125 of file MkErrorC_cc.hh.
|
inlinestatic |
Definition at line 181 of file MkErrorC_cc.hh.
|
inlinestatic |
Definition at line 182 of file MkErrorC_cc.hh.
|
inline |
Definition at line 158 of file MkErrorC_cc.hh.
|
inline |
Definition at line 161 of file MkErrorC_cc.hh.
|
inline |
Definition at line 73 of file MkErrorC_cc.hh.
|
inlinestatic |
return MkErrorC from LibMsgqueObject
Definition at line 77 of file MkErrorC_cc.hh.
Definition at line 34 of file MkErrorC_cc.hh.