theKernel 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - py - jv - cc
Loading...
Searching...
No Matches
MkErrorC_Misc_C_API

MkErrorC - various functions to 'work' on a MkErrorSMore...

+ Collaboration diagram for MkErrorC_Misc_C_API:

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)
 

Detailed Description

MkErrorC - various functions to 'work' on a MkErrorS

Macro Definition Documentation

◆ MkErrorCatch

#define MkErrorCatch ( ...)
Value:
MkErrorCatch_RT(MK_RT_CALL __VA_ARGS__)
#define MK_RT_CALL

Definition at line 1004 of file kernel_overload_mk.h.

◆ MkErrorCatch_0E

#define MkErrorCatch_0E ( )
Value:
MkErrorCatch_2E(NULL,__func__)
#define MkErrorCatch_2E(...)

Definition at line 1011 of file kernel_overload_mk.h.

◆ MkErrorCatch_1

#define MkErrorCatch_1 ( err)
Value:
MkErrorCatch(err,NULL,__func__)
#define MkErrorCatch(...)

Definition at line 1010 of file kernel_overload_mk.h.

◆ MkErrorCatch_1E

#define MkErrorCatch_1E ( exception)
Value:
MkErrorCatch_2E(exception,__func__)

Definition at line 1008 of file kernel_overload_mk.h.

◆ MkErrorCatch_1M

#define MkErrorCatch_1M ( err)
Value:
MkErrorCatch_3M(err,NULL,__func__)
#define MkErrorCatch_3M(m,...)

Definition at line 1012 of file kernel_overload_mk.h.

◆ MkErrorCatch_2

#define MkErrorCatch_2 ( err,
exception )
Value:
MkErrorCatch(err,exception,__func__)

Definition at line 1007 of file kernel_overload_mk.h.

◆ MkErrorCatch_2E

#define MkErrorCatch_2E ( ...)
Value:
MkErrorCatch(&MkERROR,__VA_ARGS__)
#define MkERROR

Definition at line 1005 of file kernel_overload_mk.h.

◆ MkErrorCatch_2M

#define MkErrorCatch_2M ( err,
exception )
Value:
MkErrorCatch_3M(err,exception,__func__)

Definition at line 1009 of file kernel_overload_mk.h.

◆ MkErrorCatch_3M

#define MkErrorCatch_3M ( m,
... )
Value:
#define MkErrorFORMAT_1M(m)

Definition at line 1006 of file kernel_overload_mk.h.

◆ MkErrorCatch_NULL

#define MkErrorCatch_NULL ( ...)
Value:
MkErrorCatch_RT(MK_RT_CALL_NULL __VA_ARGS__)
#define MK_RT_CALL_NULL

Definition at line 1003 of file kernel_overload_mk.h.

◆ MkErrorLog

#define MkErrorLog ( ...)
Value:
MkErrorLog_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 1016 of file kernel_overload_mk.h.

◆ MkErrorLog_0E

#define MkErrorLog_0E ( )
Value:
MkErrorLog_4E(NULL,0,__func__,0)
#define MkErrorLog_4E(...)

Definition at line 1029 of file kernel_overload_mk.h.

◆ MkErrorLog_1

#define MkErrorLog_1 ( err)
Value:
MkErrorLog(err,NULL,0,__func__,0)
#define MkErrorLog(...)

Definition at line 1028 of file kernel_overload_mk.h.

◆ MkErrorLog_1E

#define MkErrorLog_1E ( fmtobj)
Value:
MkErrorLog_4E(fmtobj,0,__func__,0)

Definition at line 1026 of file kernel_overload_mk.h.

◆ MkErrorLog_1EF_NULL

#define MkErrorLog_1EF_NULL ( fmt)
Value:
MkErrorLog(&MkERROR_NULL,MkObj(fmt),0,__func__,0)
#define MkERROR_NULL

Definition at line 10741 of file LibMkKernel_mk.h.

◆ MkErrorLog_1M

#define MkErrorLog_1M ( err)
Value:
MkErrorLog_5M(err,NULL,0,__func__,0)
#define MkErrorLog_5M(m,...)

Definition at line 1030 of file kernel_overload_mk.h.

◆ MkErrorLog_2

#define MkErrorLog_2 ( err,
fmtobj )
Value:
MkErrorLog(err,fmtobj,0,__func__,0)

Definition at line 1025 of file kernel_overload_mk.h.

◆ MkErrorLog_2E

#define MkErrorLog_2E ( fmtobj,
debug )
Value:
MkErrorLog_4E(fmtobj,debug,__func__,0)

Definition at line 1023 of file kernel_overload_mk.h.

◆ MkErrorLog_2M

#define MkErrorLog_2M ( err,
fmtobj )
Value:
MkErrorLog_5M(err,fmtobj,0,__func__,0)

Definition at line 1027 of file kernel_overload_mk.h.

◆ MkErrorLog_3

#define MkErrorLog_3 ( err,
fmtobj,
debug )
Value:
MkErrorLog(err,fmtobj,debug,__func__,0)

Definition at line 1022 of file kernel_overload_mk.h.

◆ MkErrorLog_3E

#define MkErrorLog_3E ( fmtobj,
debug,
callfunc )
Value:
MkErrorLog_4E(fmtobj,debug,callfunc,0)

Definition at line 1020 of file kernel_overload_mk.h.

◆ MkErrorLog_3M

#define MkErrorLog_3M ( err,
fmtobj,
debug )
Value:
MkErrorLog_5M(err,fmtobj,debug,__func__,0)

Definition at line 1024 of file kernel_overload_mk.h.

◆ MkErrorLog_4

#define MkErrorLog_4 ( err,
fmtobj,
debug,
callfunc )
Value:
MkErrorLog(err,fmtobj,debug,callfunc,0)

Definition at line 1019 of file kernel_overload_mk.h.

◆ MkErrorLog_4E

#define MkErrorLog_4E ( ...)
Value:
MkErrorLog(&MkERROR,__VA_ARGS__)

Definition at line 1017 of file kernel_overload_mk.h.

◆ MkErrorLog_4M

#define MkErrorLog_4M ( err,
fmtobj,
debug,
callfunc )
Value:
MkErrorLog_5M(err,fmtobj,debug,callfunc,0)

Definition at line 1021 of file kernel_overload_mk.h.

◆ MkErrorLog_5M

#define MkErrorLog_5M ( m,
... )
Value:

Definition at line 1018 of file kernel_overload_mk.h.

◆ MkErrorLog_NULL

#define MkErrorLog_NULL ( ...)
Value:
MkErrorLog_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 1015 of file kernel_overload_mk.h.

◆ MkErrorPrintln

#define MkErrorPrintln ( ...)
Value:
MkErrorPrintln_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 1032 of file kernel_overload_mk.h.

◆ MkErrorPrintln_0

#define MkErrorPrintln_0 ( )
Value:
#define MkErrorPrintln_0E()

Definition at line 10719 of file LibMkKernel_mk.h.

◆ MkErrorPrintln_0E

#define MkErrorPrintln_0E ( )
Value:
#define MkErrorPrintln(...)

Definition at line 1033 of file kernel_overload_mk.h.

◆ MkErrorPrintln_1M

#define MkErrorPrintln_1M ( m)
Value:

Definition at line 1034 of file kernel_overload_mk.h.

◆ MkErrorPrintln_NULL

#define MkErrorPrintln_NULL ( ...)
Value:
MkErrorPrintln_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 1031 of file kernel_overload_mk.h.

◆ MkErrorReset

#define MkErrorReset ( ...)
Value:
MkErrorReset_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 1036 of file kernel_overload_mk.h.

◆ MkErrorReset_0E

#define MkErrorReset_0E ( )
Value:
MkErrorReset_3E(__func__,__LINE__,false)
#define MkErrorReset_3E(...)

Definition at line 1046 of file kernel_overload_mk.h.

◆ MkErrorReset_0M

#define MkErrorReset_0M ( )
Value:
MkErrorReset_4M(NULL,__func__,__LINE__,0);
#define MkErrorReset_4M(m,...)

Definition at line 10834 of file LibMkKernel_mk.h.

◆ MkErrorReset_1

#define MkErrorReset_1 ( err)
Value:
MkErrorReset(err,__func__,__LINE__,false)
#define MkErrorReset(...)

Definition at line 1045 of file kernel_overload_mk.h.

◆ MkErrorReset_1E

#define MkErrorReset_1E ( callfunc)
Value:
MkErrorReset_3E(callfunc,__LINE__,false)

Definition at line 1043 of file kernel_overload_mk.h.

◆ MkErrorReset_1M

#define MkErrorReset_1M ( err)
Value:
MkErrorReset_4M(err,__func__,__LINE__,false)

Definition at line 1047 of file kernel_overload_mk.h.

◆ MkErrorReset_1X

#define MkErrorReset_1X ( x)
Value:
MkErrorReset_4X(x,__func__,__LINE__,0)
#define MkErrorReset_4X(x,...)

Definition at line 10838 of file LibMkKernel_mk.h.

◆ MkErrorReset_2

#define MkErrorReset_2 ( err,
callfunc )
Value:
MkErrorReset(err,callfunc,__LINE__,false)

Definition at line 1042 of file kernel_overload_mk.h.

◆ MkErrorReset_2E

#define MkErrorReset_2E ( callfunc,
callline )
Value:
MkErrorReset_3E(callfunc,callline,false)

Definition at line 1040 of file kernel_overload_mk.h.

◆ MkErrorReset_2M

#define MkErrorReset_2M ( err,
callfunc )
Value:
MkErrorReset_4M(err,callfunc,__LINE__,false)

Definition at line 1044 of file kernel_overload_mk.h.

◆ MkErrorReset_3

#define MkErrorReset_3 ( err,
callfunc,
callline )
Value:
MkErrorReset(err,callfunc,callline,false)

Definition at line 1039 of file kernel_overload_mk.h.

◆ MkErrorReset_3E

#define MkErrorReset_3E ( ...)
Value:
MkErrorReset(&MkERROR,__VA_ARGS__)

Definition at line 1037 of file kernel_overload_mk.h.

◆ MkErrorReset_3M

#define MkErrorReset_3M ( err,
callfunc,
callline )
Value:
MkErrorReset_4M(err,callfunc,callline,false)

Definition at line 1041 of file kernel_overload_mk.h.

◆ MkErrorReset_4M

#define MkErrorReset_4M ( m,
... )
Value:

Definition at line 1038 of file kernel_overload_mk.h.

◆ MkErrorReset_4X

#define MkErrorReset_4X ( x,
... )
Value:
#define MkErrorFORMAT_1X(x)

Definition at line 10837 of file LibMkKernel_mk.h.

◆ MkErrorReset_C

#define MkErrorReset_C ( ...)
Value:
if (MkErrorCheckI(MkErrorReset(__VA_ARGS__)))
#define MkErrorCheckI(err)

Definition at line 1049 of file kernel_overload_mk.h.

◆ MkErrorReset_E

#define MkErrorReset_E ( ...)
Value:
#define MkErrorCheck(err)
check return-code and goto error on error …

Definition at line 1048 of file kernel_overload_mk.h.

◆ MkErrorReset_NULL

#define MkErrorReset_NULL ( ...)
Value:
MkErrorReset_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 1035 of file kernel_overload_mk.h.

◆ MkErrorResetFORCE

#define MkErrorResetFORCE ( m)
Value:
MkErrorReset_4M(m,__func__,__LINE__,1);

Definition at line 10835 of file LibMkKernel_mk.h.

◆ MkErrorStack

#define MkErrorStack ( ...)
Value:
MkErrorStack_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 1051 of file kernel_overload_mk.h.

◆ MkErrorStack_0_NULL

#define MkErrorStack_0_NULL ( )
Value:
MkErrorStack_NULL(&MkERROR_NULL,__func__,__FILE__,__LINE__)
#define MkErrorStack_NULL(...)

Definition at line 10883 of file LibMkKernel_mk.h.

◆ MkErrorStack_0E

#define MkErrorStack_0E ( )
Value:
MkErrorStack_3E(__func__,__FILE__,__LINE__)
#define MkErrorStack_3E(...)

Definition at line 1061 of file kernel_overload_mk.h.

◆ MkErrorStack_0E_Check

#define MkErrorStack_0E_Check ( )
Value:
#define MkErrorCheckE_0E()
#define MkErrorGetCode_0E()
#define MkErrorStack_0E()

Definition at line 10876 of file LibMkKernel_mk.h.

◆ MkErrorStack_1

#define MkErrorStack_1 ( err)
Value:
MkErrorStack(err,__func__,__FILE__,__LINE__)
#define MkErrorStack(...)

Definition at line 1060 of file kernel_overload_mk.h.

◆ MkErrorStack_1E

#define MkErrorStack_1E ( callfunc)
Value:
MkErrorStack_3E(callfunc,__FILE__,__LINE__)

Definition at line 1058 of file kernel_overload_mk.h.

◆ MkErrorStack_1M

#define MkErrorStack_1M ( err)
Value:
MkErrorStack_4M(err,__func__,__FILE__,__LINE__)
#define MkErrorStack_4M(m,...)

Definition at line 1062 of file kernel_overload_mk.h.

◆ MkErrorStack_1M_Check

#define MkErrorStack_1M_Check ( m)
Value:

Definition at line 10875 of file LibMkKernel_mk.h.

◆ MkErrorStack_1X

#define MkErrorStack_1X ( ...)
Value:
MkErrorStack_4X(__VA_ARGS__,__func__,__FILE__,__LINE__)
#define MkErrorStack_4X(x,...)

Definition at line 10881 of file LibMkKernel_mk.h.

◆ MkErrorStack_1X_NULL

#define MkErrorStack_1X_NULL ( ...)
Value:
MkErrorStack_4X_NULL(__VA_ARGS__,__func__,__FILE__,__LINE__)
#define MkErrorStack_4X_NULL(x,...)

Definition at line 10888 of file LibMkKernel_mk.h.

◆ MkErrorStack_2

#define MkErrorStack_2 ( err,
callfunc )
Value:
MkErrorStack(err,callfunc,__FILE__,__LINE__)

Definition at line 1057 of file kernel_overload_mk.h.

◆ MkErrorStack_2E

#define MkErrorStack_2E ( callfunc,
callfile )
Value:
MkErrorStack_3E(callfunc,callfile,__LINE__)

Definition at line 1055 of file kernel_overload_mk.h.

◆ MkErrorStack_2M

#define MkErrorStack_2M ( err,
callfunc )
Value:
MkErrorStack_4M(err,callfunc,__FILE__,__LINE__)

Definition at line 1059 of file kernel_overload_mk.h.

◆ MkErrorStack_2X

#define MkErrorStack_2X ( ...)
Value:
MkErrorStack_4X(__VA_ARGS__,__FILE__,__LINE__)

Definition at line 10880 of file LibMkKernel_mk.h.

◆ MkErrorStack_2X_NULL

#define MkErrorStack_2X_NULL ( ...)
Value:
MkErrorStack_4X_NULL(__VA_ARGS__,__FILE__,__LINE__)

Definition at line 10887 of file LibMkKernel_mk.h.

◆ MkErrorStack_3

#define MkErrorStack_3 ( err,
callfunc,
callfile )
Value:
MkErrorStack(err,callfunc,callfile,__LINE__)

Definition at line 1054 of file kernel_overload_mk.h.

◆ MkErrorStack_3E

#define MkErrorStack_3E ( ...)
Value:
MkErrorStack(&MkERROR,__VA_ARGS__)

Definition at line 1052 of file kernel_overload_mk.h.

◆ MkErrorStack_3M

#define MkErrorStack_3M ( err,
callfunc,
callfile )
Value:
MkErrorStack_4M(err,callfunc,callfile,__LINE__)

Definition at line 1056 of file kernel_overload_mk.h.

◆ MkErrorStack_3X

#define MkErrorStack_3X ( ...)
Value:
MkErrorStack_4X(__VA_ARGS__,__LINE__)

Definition at line 10879 of file LibMkKernel_mk.h.

◆ MkErrorStack_3X_NULL

#define MkErrorStack_3X_NULL ( ...)
Value:
MkErrorStack_4X_NULL(__VA_ARGS__,__LINE__)

Definition at line 10886 of file LibMkKernel_mk.h.

◆ MkErrorStack_4M

#define MkErrorStack_4M ( m,
... )
Value:

Definition at line 1053 of file kernel_overload_mk.h.

◆ MkErrorStack_4X

#define MkErrorStack_4X ( x,
... )
Value:
MkErrorStack_RT(MK_RT_CALL MkErrorFORMAT_1X(x),__VA_ARGS__)

Definition at line 10878 of file LibMkKernel_mk.h.

◆ MkErrorStack_4X_NULL

#define MkErrorStack_4X_NULL ( x,
... )
Value:

Definition at line 10885 of file LibMkKernel_mk.h.

◆ MkErrorStack_NULL

#define MkErrorStack_NULL ( ...)
Value:
MkErrorStack_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 1050 of file kernel_overload_mk.h.

◆ MkErrorStack_NUM

#define MkErrorStack_NUM   50

Definition at line 10890 of file LibMkKernel_mk.h.

◆ MkErrorStack_STR

#define MkErrorStack_STR   "50"

Definition at line 10891 of file LibMkKernel_mk.h.

◆ MkErrorStackFormat

#define MkErrorStackFormat ( ...)
Value:
MkErrorStackFormat_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 1064 of file kernel_overload_mk.h.

◆ MkErrorStackFormat_0E

#define MkErrorStackFormat_0E ( )
Value:
MkErrorStackFormat_3E(__func__,__FILE__,__LINE__)
#define MkErrorStackFormat_3E(...)

Definition at line 1074 of file kernel_overload_mk.h.

◆ MkErrorStackFormat_1

#define MkErrorStackFormat_1 ( err)
Value:
MkErrorStackFormat(err,__func__,__FILE__,__LINE__)
#define MkErrorStackFormat(...)

Definition at line 1073 of file kernel_overload_mk.h.

◆ MkErrorStackFormat_1E

#define MkErrorStackFormat_1E ( callfunc)
Value:
MkErrorStackFormat_3E(callfunc,__FILE__,__LINE__)

Definition at line 1071 of file kernel_overload_mk.h.

◆ MkErrorStackFormat_1M

#define MkErrorStackFormat_1M ( err)
Value:
MkErrorStackFormat_4M(err,__func__,__FILE__,__LINE__)
#define MkErrorStackFormat_4M(m,...)

Definition at line 1075 of file kernel_overload_mk.h.

◆ MkErrorStackFormat_2

#define MkErrorStackFormat_2 ( err,
callfunc )
Value:
MkErrorStackFormat(err,callfunc,__FILE__,__LINE__)

Definition at line 1070 of file kernel_overload_mk.h.

◆ MkErrorStackFormat_2E

#define MkErrorStackFormat_2E ( callfunc,
callfile )
Value:
MkErrorStackFormat_3E(callfunc,callfile,__LINE__)

Definition at line 1068 of file kernel_overload_mk.h.

◆ MkErrorStackFormat_2M

#define MkErrorStackFormat_2M ( err,
callfunc )
Value:
MkErrorStackFormat_4M(err,callfunc,__FILE__,__LINE__)

Definition at line 1072 of file kernel_overload_mk.h.

◆ MkErrorStackFormat_3

#define MkErrorStackFormat_3 ( err,
callfunc,
callfile )
Value:
MkErrorStackFormat(err,callfunc,callfile,__LINE__)

Definition at line 1067 of file kernel_overload_mk.h.

◆ MkErrorStackFormat_3E

#define MkErrorStackFormat_3E ( ...)
Value:

Definition at line 1065 of file kernel_overload_mk.h.

◆ MkErrorStackFormat_3M

#define MkErrorStackFormat_3M ( err,
callfunc,
callfile )
Value:
MkErrorStackFormat_4M(err,callfunc,callfile,__LINE__)

Definition at line 1069 of file kernel_overload_mk.h.

◆ MkErrorStackFormat_4M

#define MkErrorStackFormat_4M ( m,
... )
Value:

Definition at line 1066 of file kernel_overload_mk.h.

◆ MkErrorStackFormat_NULL

#define MkErrorStackFormat_NULL ( ...)
Value:
MkErrorStackFormat_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 1063 of file kernel_overload_mk.h.

◆ MkErrorToString

#define MkErrorToString ( ...)
Value:
MkErrorToString_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 1077 of file kernel_overload_mk.h.

◆ MkErrorToString_0E

#define MkErrorToString_0E ( )
Value:
#define MkErrorToString(...)

Definition at line 1078 of file kernel_overload_mk.h.

◆ MkErrorToString_1M

#define MkErrorToString_1M ( m)
Value:

Definition at line 1079 of file kernel_overload_mk.h.

◆ MkErrorToString_NULL

#define MkErrorToString_NULL ( ...)
Value:
MkErrorToString_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 1076 of file kernel_overload_mk.h.

◆ MkObjectErrorCatch_3X

#define MkObjectErrorCatch_3X ( x,
... )
Value:
MkObjectErrorCatch(MkOBJ(x),__VA_ARGS__)
#define MkOBJ(x)
cast a known-object into an MkObjectS pointer
#define MkObjectErrorCatch(...)

inline for MkObjectErrorCatch

Definition at line 10802 of file LibMkKernel_mk.h.

Function Documentation

◆ MkErrorCatch_RT()

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");
  }
Note
The C language does not support the MkErrorCatch because there is no native error object.
If there is no error at all the MkErrorCatch does nothing and just return the MkErrorDEFAULT.
Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]errthe MkErrorS instance to work on - the default-error is automatically created on startup. (NULL allowed)
[in]exceptionthe exception object from C++, if MK_NULL the global exception object is used
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
Returns
the ErrorDEFAULT initialized with exception value
See also
ObjectErrorCatch ErrorRaise ErrorReset

◆ MkErrorLog_RT()

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) …

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]errthe MkErrorS instance to work on - the default-error is automatically created on startup. (NULL allowed)
[in]fmtobjmanaged object used to format the log-message (default=MK_NULL → use default-format)
[in]debugthe debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0)
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]lvla user-defined prefix starting with "" for lvl=0 and increase with " " for lvl+1 (default=0)
See also
MkErrorC err.Log(const MkObjectC* fmtobj = NULL, MK_DBG debug = 0, MK_STRN callfunc = __builtin_FUNCTION(), MK_I32 lvl = 0)

◆ MkErrorPrintln_RT()

MK_EXTERN void libmkkernel::MkErrorPrintln_RT ( MK_RT const mkrt,
MK_ERR const err )

print the default-error to the MkLogFileC (default: stderr) and clear the error afterwards …

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]errthe MkErrorS instance to work on - the default-error is automatically created on startup. (NULL allowed)
+ Here is the caller graph for this function:

◆ MkErrorRaise_RT()

MK_EXTERN enum MkErrorE libmkkernel::MkErrorRaise_RT ( MK_RT const mkrt,
MK_ERRN const err )

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"

◆ MkErrorReset_RT()

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

Attention
Use this function carfully, as misuse will result in the loss of the error-message.

It is recommended that you use this feature only after the error has been processed.

  • processed = The error was send to another server or printed to the user or to a file.
See also
ErrorRaise ErrorCatch

◆ MkErrorStack_RT()

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

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]errthe MkErrorS instance to work on - the default-error is automatically created on startup. (NULL allowed) → MK_NULL allowed
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]callfilethe name of the file the call take place (e.g. FILE)
[in]calllinethe number of the line the call take place (e.g. LINE)
Exceptions
MkExceptionC→ The default-exception from the Programming-Language-Micro-Kernel (PLMK)
+ Here is the caller graph for this function:

◆ MkErrorStackFormat_RT()

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

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]errthe MkErrorS instance to work on - the default-error is automatically created on startup. (NULL allowed)
[in]callfunca user-defined postfix to identify the calling function or the environment (default=name-of-function)
[in]callfilethe name of the file the call take place (e.g. FILE)
[in]calllinethe number of the line the call take place (e.g. LINE)
+ Here is the caller graph for this function:

◆ MkErrorToString_RT()

MK_EXTERN MK_STRN libmkkernel::MkErrorToString_RT ( MK_RT const mkrt,
MK_ERR const inst )

String-Slot - returns the string representation of the inst

The string is a human-readable form of the data stored in the object.

See also
slot: every class should provide a ToString function by default.
Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]inst- the instance to work on
Returns
the requested string or "MK_NULL" on error
Note
(do not free) The memory of the out/return value belongs to the called CcMkKernel function and therefore never becomes MK_NULL for a non-error result.
For details on the out/return value, see: MkKernel_Storage_C_API.
+ Here is the caller graph for this function: