MkErrorC - various functions to 'work' on a MkErrorS … More...
Macros | |
#define | MkErrorPrintln_0() |
#define | MkErrorLog_1EF_NULL(fmt) |
#define | MkObjectErrorCatch_3X(x, ...) |
inline for MkObjectErrorCatch … | |
#define | MkErrorReset_0M() |
#define | MkErrorResetFORCE(m) |
#define | MkErrorReset_4X(x, ...) |
#define | MkErrorReset_1X(x) |
#define | MkErrorStack_1M_Check(m) |
#define | MkErrorStack_0E_Check() |
#define | MkErrorStack_4X(x, ...) |
#define | MkErrorStack_3X(...) |
#define | MkErrorStack_2X(...) |
#define | MkErrorStack_1X(...) |
#define | MkErrorStack_0_NULL() |
#define | MkErrorStack_4X_NULL(x, ...) |
#define | MkErrorStack_3X_NULL(...) |
#define | MkErrorStack_2X_NULL(...) |
#define | MkErrorStack_1X_NULL(...) |
#define | MkErrorStack_NUM 50 |
#define | MkErrorStack_STR "50" |
Functions | |
MK_EXTERN void | libmkkernel::MkErrorPrintln_RT (MK_RT const mkrt, MK_ERR const err) MK_RT_ATTR_HDL |
print the default-error to the MkLogFileC (default: stderr) and clear the error afterwards … | |
MK_EXTERN void | libmkkernel::MkErrorLog_RT (MK_RT const mkrt, MK_ERRN const err, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl) |
log the error to MkLogFileC (default: stderr) … | |
MK_EXTERN MK_ERR | libmkkernel::MkErrorCatch_RT (MK_RT const mkrt, MK_ERR const err, MK_EXP const exception, MK_STRN const callfunc) MK_RT_ATTR_HDL |
convert a programming-language-error into an ccmkkernel error … | |
MK_EXTERN enum MkErrorE | libmkkernel::MkErrorRaise_RT (MK_RT const mkrt, MK_ERRN const err) MK_RT_ATTR_HDL |
convert an ccmkkernel error into an programming-language-error and raise afterwards. … | |
MK_EXTERN enum MkErrorE | libmkkernel::MkErrorReset_RT (MK_RT const mkrt, MK_ERR const err, MK_STRN const callfunc, MK_I32 const callline, bool const force) MK_RT_ATTR_HDL |
This function clears the err and resets to libmkkernel::MK_OK … | |
MK_EXTERN void | libmkkernel::MkErrorStackFormat_RT (MK_RT const mkrt, MK_ERR const err, MK_STRN callfunc, MK_STRN callfile, MK_I32 const callline) MK_RT_ATTR_HDL |
append an ensemble of func, file and line to the error-message … | |
MK_EXTERN enum MkErrorE | libmkkernel::MkErrorStack_RT (MK_RT const mkrt, MK_ERR const err, MK_STRN const callfunc, MK_STRN const callfile, MK_I32 const callline) |
check on error and if yes append an ErrorStackFormat to the error-message … | |
MK_EXTERN MK_STRN | libmkkernel::MkErrorToString_RT (MK_RT const mkrt, MK_ERR const inst) MK_RT_ATTR_HDL |
String-Slot - returns the string representation of the inst … | |
MkErrorC - MkErrorC_Misc_C_API - overload | |
#define | MkErrorCatch_NULL(...) |
#define | MkErrorCatch(...) |
#define | MkErrorCatch_2E(...) |
#define | MkErrorCatch_3M(m, ...) |
#define | MkErrorCatch_2(err, exception) |
#define | MkErrorCatch_1E(exception) |
#define | MkErrorCatch_2M(err, exception) |
#define | MkErrorCatch_1(err) |
#define | MkErrorCatch_0E() |
#define | MkErrorCatch_1M(err) |
#define | MkErrorLog_NULL(...) |
#define | MkErrorLog(...) |
#define | MkErrorLog_4E(...) |
#define | MkErrorLog_5M(m, ...) |
#define | MkErrorLog_4(err, fmtobj, debug, callfunc) |
#define | MkErrorLog_3E(fmtobj, debug, callfunc) |
#define | MkErrorLog_4M(err, fmtobj, debug, callfunc) |
#define | MkErrorLog_3(err, fmtobj, debug) |
#define | MkErrorLog_2E(fmtobj, debug) |
#define | MkErrorLog_3M(err, fmtobj, debug) |
#define | MkErrorLog_2(err, fmtobj) |
#define | MkErrorLog_1E(fmtobj) |
#define | MkErrorLog_2M(err, fmtobj) |
#define | MkErrorLog_1(err) |
#define | MkErrorLog_0E() |
#define | MkErrorLog_1M(err) |
#define | MkErrorPrintln_NULL(...) |
#define | MkErrorPrintln(...) |
#define | MkErrorPrintln_0E() |
#define | MkErrorPrintln_1M(m) |
#define | MkErrorReset_NULL(...) |
#define | MkErrorReset(...) |
#define | MkErrorReset_3E(...) |
#define | MkErrorReset_4M(m, ...) |
#define | MkErrorReset_3(err, callfunc, callline) |
#define | MkErrorReset_2E(callfunc, callline) |
#define | MkErrorReset_3M(err, callfunc, callline) |
#define | MkErrorReset_2(err, callfunc) |
#define | MkErrorReset_1E(callfunc) |
#define | MkErrorReset_2M(err, callfunc) |
#define | MkErrorReset_1(err) |
#define | MkErrorReset_0E() |
#define | MkErrorReset_1M(err) |
#define | MkErrorReset_E(...) |
#define | MkErrorReset_C(...) |
#define | MkErrorStack_NULL(...) |
#define | MkErrorStack(...) |
#define | MkErrorStack_3E(...) |
#define | MkErrorStack_4M(m, ...) |
#define | MkErrorStack_3(err, callfunc, callfile) |
#define | MkErrorStack_2E(callfunc, callfile) |
#define | MkErrorStack_3M(err, callfunc, callfile) |
#define | MkErrorStack_2(err, callfunc) |
#define | MkErrorStack_1E(callfunc) |
#define | MkErrorStack_2M(err, callfunc) |
#define | MkErrorStack_1(err) |
#define | MkErrorStack_0E() |
#define | MkErrorStack_1M(err) |
#define | MkErrorStackFormat_NULL(...) |
#define | MkErrorStackFormat(...) |
#define | MkErrorStackFormat_3E(...) |
#define | MkErrorStackFormat_4M(m, ...) |
#define | MkErrorStackFormat_3(err, callfunc, callfile) |
#define | MkErrorStackFormat_2E(callfunc, callfile) |
#define | MkErrorStackFormat_3M(err, callfunc, callfile) |
#define | MkErrorStackFormat_2(err, callfunc) |
#define | MkErrorStackFormat_1E(callfunc) |
#define | MkErrorStackFormat_2M(err, callfunc) |
#define | MkErrorStackFormat_1(err) |
#define | MkErrorStackFormat_0E() |
#define | MkErrorStackFormat_1M(err) |
#define | MkErrorToString_NULL(...) |
#define | MkErrorToString(...) |
#define | MkErrorToString_0E() |
#define | MkErrorToString_1M(m) |
MkErrorC - various functions to 'work' on a MkErrorS …
#define MkErrorCatch | ( | ... | ) |
Definition at line 1004 of file kernel_overload_mk.h.
#define MkErrorCatch_0E | ( | ) |
Definition at line 1011 of file kernel_overload_mk.h.
#define MkErrorCatch_1 | ( | err | ) |
Definition at line 1010 of file kernel_overload_mk.h.
#define MkErrorCatch_1E | ( | exception | ) |
Definition at line 1008 of file kernel_overload_mk.h.
#define MkErrorCatch_1M | ( | err | ) |
Definition at line 1012 of file kernel_overload_mk.h.
#define MkErrorCatch_2 | ( | err, | |
exception ) |
Definition at line 1007 of file kernel_overload_mk.h.
#define MkErrorCatch_2E | ( | ... | ) |
Definition at line 1005 of file kernel_overload_mk.h.
#define MkErrorCatch_2M | ( | err, | |
exception ) |
Definition at line 1009 of file kernel_overload_mk.h.
#define MkErrorCatch_3M | ( | m, | |
... ) |
Definition at line 1006 of file kernel_overload_mk.h.
#define MkErrorCatch_NULL | ( | ... | ) |
Definition at line 1003 of file kernel_overload_mk.h.
#define MkErrorLog | ( | ... | ) |
Definition at line 1016 of file kernel_overload_mk.h.
#define MkErrorLog_0E | ( | ) |
Definition at line 1029 of file kernel_overload_mk.h.
#define MkErrorLog_1 | ( | err | ) |
Definition at line 1028 of file kernel_overload_mk.h.
#define MkErrorLog_1E | ( | fmtobj | ) |
Definition at line 1026 of file kernel_overload_mk.h.
#define MkErrorLog_1EF_NULL | ( | fmt | ) |
Definition at line 10741 of file LibMkKernel_mk.h.
#define MkErrorLog_1M | ( | err | ) |
Definition at line 1030 of file kernel_overload_mk.h.
#define MkErrorLog_2 | ( | err, | |
fmtobj ) |
Definition at line 1025 of file kernel_overload_mk.h.
#define MkErrorLog_2E | ( | fmtobj, | |
debug ) |
Definition at line 1023 of file kernel_overload_mk.h.
#define MkErrorLog_2M | ( | err, | |
fmtobj ) |
Definition at line 1027 of file kernel_overload_mk.h.
#define MkErrorLog_3 | ( | err, | |
fmtobj, | |||
debug ) |
Definition at line 1022 of file kernel_overload_mk.h.
#define MkErrorLog_3E | ( | fmtobj, | |
debug, | |||
callfunc ) |
Definition at line 1020 of file kernel_overload_mk.h.
#define MkErrorLog_3M | ( | err, | |
fmtobj, | |||
debug ) |
Definition at line 1024 of file kernel_overload_mk.h.
#define MkErrorLog_4 | ( | err, | |
fmtobj, | |||
debug, | |||
callfunc ) |
Definition at line 1019 of file kernel_overload_mk.h.
#define MkErrorLog_4E | ( | ... | ) |
Definition at line 1017 of file kernel_overload_mk.h.
#define MkErrorLog_4M | ( | err, | |
fmtobj, | |||
debug, | |||
callfunc ) |
Definition at line 1021 of file kernel_overload_mk.h.
#define MkErrorLog_5M | ( | m, | |
... ) |
Definition at line 1018 of file kernel_overload_mk.h.
#define MkErrorLog_NULL | ( | ... | ) |
Definition at line 1015 of file kernel_overload_mk.h.
#define MkErrorPrintln | ( | ... | ) |
Definition at line 1032 of file kernel_overload_mk.h.
#define MkErrorPrintln_0 | ( | ) |
Definition at line 10719 of file LibMkKernel_mk.h.
#define MkErrorPrintln_0E | ( | ) |
Definition at line 1033 of file kernel_overload_mk.h.
#define MkErrorPrintln_1M | ( | m | ) |
Definition at line 1034 of file kernel_overload_mk.h.
#define MkErrorPrintln_NULL | ( | ... | ) |
Definition at line 1031 of file kernel_overload_mk.h.
#define MkErrorReset | ( | ... | ) |
Definition at line 1036 of file kernel_overload_mk.h.
#define MkErrorReset_0E | ( | ) |
Definition at line 1046 of file kernel_overload_mk.h.
#define MkErrorReset_0M | ( | ) |
Definition at line 10834 of file LibMkKernel_mk.h.
#define MkErrorReset_1 | ( | err | ) |
Definition at line 1045 of file kernel_overload_mk.h.
#define MkErrorReset_1E | ( | callfunc | ) |
Definition at line 1043 of file kernel_overload_mk.h.
#define MkErrorReset_1M | ( | err | ) |
Definition at line 1047 of file kernel_overload_mk.h.
#define MkErrorReset_1X | ( | x | ) |
Definition at line 10838 of file LibMkKernel_mk.h.
#define MkErrorReset_2 | ( | err, | |
callfunc ) |
Definition at line 1042 of file kernel_overload_mk.h.
#define MkErrorReset_2E | ( | callfunc, | |
callline ) |
Definition at line 1040 of file kernel_overload_mk.h.
#define MkErrorReset_2M | ( | err, | |
callfunc ) |
Definition at line 1044 of file kernel_overload_mk.h.
#define MkErrorReset_3 | ( | err, | |
callfunc, | |||
callline ) |
Definition at line 1039 of file kernel_overload_mk.h.
#define MkErrorReset_3E | ( | ... | ) |
Definition at line 1037 of file kernel_overload_mk.h.
#define MkErrorReset_3M | ( | err, | |
callfunc, | |||
callline ) |
Definition at line 1041 of file kernel_overload_mk.h.
#define MkErrorReset_4M | ( | m, | |
... ) |
Definition at line 1038 of file kernel_overload_mk.h.
#define MkErrorReset_4X | ( | x, | |
... ) |
Definition at line 10837 of file LibMkKernel_mk.h.
#define MkErrorReset_C | ( | ... | ) |
Definition at line 1049 of file kernel_overload_mk.h.
#define MkErrorReset_E | ( | ... | ) |
Definition at line 1048 of file kernel_overload_mk.h.
#define MkErrorReset_NULL | ( | ... | ) |
Definition at line 1035 of file kernel_overload_mk.h.
#define MkErrorResetFORCE | ( | m | ) |
Definition at line 10835 of file LibMkKernel_mk.h.
#define MkErrorStack | ( | ... | ) |
Definition at line 1051 of file kernel_overload_mk.h.
#define MkErrorStack_0_NULL | ( | ) |
Definition at line 10883 of file LibMkKernel_mk.h.
#define MkErrorStack_0E | ( | ) |
Definition at line 1061 of file kernel_overload_mk.h.
#define MkErrorStack_0E_Check | ( | ) |
Definition at line 10876 of file LibMkKernel_mk.h.
#define MkErrorStack_1 | ( | err | ) |
Definition at line 1060 of file kernel_overload_mk.h.
#define MkErrorStack_1E | ( | callfunc | ) |
Definition at line 1058 of file kernel_overload_mk.h.
#define MkErrorStack_1M | ( | err | ) |
Definition at line 1062 of file kernel_overload_mk.h.
#define MkErrorStack_1M_Check | ( | m | ) |
Definition at line 10875 of file LibMkKernel_mk.h.
#define MkErrorStack_1X | ( | ... | ) |
Definition at line 10881 of file LibMkKernel_mk.h.
#define MkErrorStack_1X_NULL | ( | ... | ) |
Definition at line 10888 of file LibMkKernel_mk.h.
#define MkErrorStack_2 | ( | err, | |
callfunc ) |
Definition at line 1057 of file kernel_overload_mk.h.
#define MkErrorStack_2E | ( | callfunc, | |
callfile ) |
Definition at line 1055 of file kernel_overload_mk.h.
#define MkErrorStack_2M | ( | err, | |
callfunc ) |
Definition at line 1059 of file kernel_overload_mk.h.
#define MkErrorStack_2X | ( | ... | ) |
Definition at line 10880 of file LibMkKernel_mk.h.
#define MkErrorStack_2X_NULL | ( | ... | ) |
Definition at line 10887 of file LibMkKernel_mk.h.
#define MkErrorStack_3 | ( | err, | |
callfunc, | |||
callfile ) |
Definition at line 1054 of file kernel_overload_mk.h.
#define MkErrorStack_3E | ( | ... | ) |
Definition at line 1052 of file kernel_overload_mk.h.
#define MkErrorStack_3M | ( | err, | |
callfunc, | |||
callfile ) |
Definition at line 1056 of file kernel_overload_mk.h.
#define MkErrorStack_3X | ( | ... | ) |
Definition at line 10879 of file LibMkKernel_mk.h.
#define MkErrorStack_3X_NULL | ( | ... | ) |
Definition at line 10886 of file LibMkKernel_mk.h.
#define MkErrorStack_4M | ( | m, | |
... ) |
Definition at line 1053 of file kernel_overload_mk.h.
#define MkErrorStack_4X | ( | x, | |
... ) |
Definition at line 10878 of file LibMkKernel_mk.h.
#define MkErrorStack_4X_NULL | ( | x, | |
... ) |
Definition at line 10885 of file LibMkKernel_mk.h.
#define MkErrorStack_NULL | ( | ... | ) |
Definition at line 1050 of file kernel_overload_mk.h.
#define MkErrorStack_NUM 50 |
Definition at line 10890 of file LibMkKernel_mk.h.
#define MkErrorStack_STR "50" |
Definition at line 10891 of file LibMkKernel_mk.h.
#define MkErrorStackFormat | ( | ... | ) |
Definition at line 1064 of file kernel_overload_mk.h.
#define MkErrorStackFormat_0E | ( | ) |
Definition at line 1074 of file kernel_overload_mk.h.
#define MkErrorStackFormat_1 | ( | err | ) |
Definition at line 1073 of file kernel_overload_mk.h.
#define MkErrorStackFormat_1E | ( | callfunc | ) |
Definition at line 1071 of file kernel_overload_mk.h.
#define MkErrorStackFormat_1M | ( | err | ) |
Definition at line 1075 of file kernel_overload_mk.h.
#define MkErrorStackFormat_2 | ( | err, | |
callfunc ) |
Definition at line 1070 of file kernel_overload_mk.h.
#define MkErrorStackFormat_2E | ( | callfunc, | |
callfile ) |
Definition at line 1068 of file kernel_overload_mk.h.
#define MkErrorStackFormat_2M | ( | err, | |
callfunc ) |
Definition at line 1072 of file kernel_overload_mk.h.
#define MkErrorStackFormat_3 | ( | err, | |
callfunc, | |||
callfile ) |
Definition at line 1067 of file kernel_overload_mk.h.
#define MkErrorStackFormat_3E | ( | ... | ) |
Definition at line 1065 of file kernel_overload_mk.h.
#define MkErrorStackFormat_3M | ( | err, | |
callfunc, | |||
callfile ) |
Definition at line 1069 of file kernel_overload_mk.h.
#define MkErrorStackFormat_4M | ( | m, | |
... ) |
Definition at line 1066 of file kernel_overload_mk.h.
#define MkErrorStackFormat_NULL | ( | ... | ) |
Definition at line 1063 of file kernel_overload_mk.h.
#define MkErrorToString | ( | ... | ) |
Definition at line 1077 of file kernel_overload_mk.h.
#define MkErrorToString_0E | ( | ) |
Definition at line 1078 of file kernel_overload_mk.h.
#define MkErrorToString_1M | ( | m | ) |
Definition at line 1079 of file kernel_overload_mk.h.
#define MkErrorToString_NULL | ( | ... | ) |
Definition at line 1076 of file kernel_overload_mk.h.
#define MkObjectErrorCatch_3X | ( | x, | |
... ) |
inline for MkObjectErrorCatch …
Definition at line 10802 of file LibMkKernel_mk.h.
MK_EXTERN MK_ERR libmkkernel::MkErrorCatch_RT | ( | MK_RT const | mkrt, |
MK_ERR const | err, | ||
MK_EXP const | exception, | ||
MK_STRN const | callfunc ) |
convert a programming-language-error into an ccmkkernel error …
Same as MkObjectErrorCatch but skip the Error-Prefix in final Target-Programming-Language (TPL).
Example from Bug3.cc
→ catch an error using MkErrorC* err.Catch(std::exception* exception = NULL, MK_STRN callfunc = __builtin_FUNCTION())
} catch (const std::exception& ex) { MkErrorC::DEFAULT()->Catch(ex)->Println(); } catch (...) { MkErrorC::PRINT()->SetC("unknown exception"); }
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | err | the MkErrorS instance to work on - the default-error is automatically created on startup. (NULL allowed) |
[in] | exception | the exception object from C++, if MK_NULL the global exception object is used |
[in] | callfunc | a user-defined postfix to identify the calling function or the environment (default=name-of-function ) |
MK_EXTERN void libmkkernel::MkErrorLog_RT | ( | MK_RT const | mkrt, |
MK_ERRN const | err, | ||
MK_OBJN | fmtobj, | ||
MK_DBG const | debug, | ||
MK_STRN const | callfunc, | ||
MK_I32 const | lvl ) |
log the error to MkLogFileC (default: stderr) …
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | err | the MkErrorS instance to work on - the default-error is automatically created on startup. (NULL allowed) |
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | debug | the debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0 ) |
[in] | callfunc | a user-defined postfix to identify the calling function or the environment (default=name-of-function ) |
[in] | lvl | a user-defined prefix starting with "" for lvl=0 and increase with " " for lvl+1 (default=0 ) |
print the default-error to the MkLogFileC (default: stderr) and clear the error afterwards …
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | err | the MkErrorS instance to work on - the default-error is automatically created on startup. (NULL allowed) |
convert an ccmkkernel error into an programming-language-error and raise afterwards. …
If ther is no ccmkkernel-error (MkErrorS::code "= #libmkkernel::MK_ERROR) than nothing happen. @param [in] err the \ref libmkkernel::MkErrorS "MkErrorS" instance to work on - the \e default-error is automatically created on startup. (NULL allowed) \sa \ref doc_mk_cc_ErrorCatch "ErrorCatch" \ref doc_mk_cc_ErrorReset "ErrorReset"
MK_EXTERN enum MkErrorE libmkkernel::MkErrorReset_RT | ( | MK_RT const | mkrt, |
MK_ERR const | err, | ||
MK_STRN const | callfunc, | ||
MK_I32 const | callline, | ||
bool const | force ) |
This function clears the err and resets to libmkkernel::MK_OK …
It is recommended that you use this feature only after the error has been processed.
MK_EXTERN enum MkErrorE libmkkernel::MkErrorStack_RT | ( | MK_RT const | mkrt, |
MK_ERR const | err, | ||
MK_STRN const | callfunc, | ||
MK_STRN const | callfile, | ||
MK_I32 const | callline ) |
check on error and if yes append an ErrorStackFormat to the error-message …
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | err | the MkErrorS instance to work on - the default-error is automatically created on startup. (NULL allowed) → MK_NULL allowed |
[in] | callfunc | a user-defined postfix to identify the calling function or the environment (default=name-of-function ) |
[in] | callfile | the name of the file the call take place (e.g. FILE) |
[in] | callline | the number of the line the call take place (e.g. LINE) |
MkExceptionC | → The default-exception from the Programming-Language-Micro-Kernel (PLMK) |
MK_EXTERN void libmkkernel::MkErrorStackFormat_RT | ( | MK_RT const | mkrt, |
MK_ERR const | err, | ||
MK_STRN | callfunc, | ||
MK_STRN | callfile, | ||
MK_I32 const | callline ) |
append an ensemble of func, file and line to the error-message …
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | err | the MkErrorS instance to work on - the default-error is automatically created on startup. (NULL allowed) |
[in] | callfunc | a user-defined postfix to identify the calling function or the environment (default=name-of-function ) |
[in] | callfile | the name of the file the call take place (e.g. FILE) |
[in] | callline | the number of the line the call take place (e.g. LINE) |
String-Slot - returns the string representation of the inst …
The string is a human-readable form of the data stored in the object.
ToString
function by default.[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | inst | - the instance to work on |
"MK_NULL"
on error MK_NULL
for a non-error result.