theKernel 10.0
Loading...
Searching...
No Matches
MkErrorC_Signal_C_API

MkErrorC - various functions to set and check a 'signal' on a MkErrorSMore...

+ Collaboration diagram for MkErrorC_Signal_C_API:

Functions

void MkErrorSetCONTINUE_RT (MK_RT mkrt, MK_ERR const err)
 signal end of processing in an MqMqEventIF callback …
 
enum MkErrorE MkErrorSetEXIT_RT (MK_RT mkrt, MK_ERR const err, MK_STRN const callfunc)
 finish the current callback, return to toplevel and MqExit the application …
 
enum MkErrorE MkErrorSetSOCKET_RT (MK_RT mkrt, MK_ERR const err, MK_STRN const detail, MK_STRN const callfunc)
 create SOCKET-DOWN error …
 
enum MkErrorE MkErrorSetABORT_RT (MK_RT mkrt, MK_ERR const err, MK_STRN const detail, MK_STRN const callfunc)
 send the ABORT signal to the calling stack…
 
void MkErrorSetCode_RT (MK_RT mkrt, MK_ERR const err, enum MkErrorE code)
 set the MkErrorS::code value …
 
bool MkErrorIsSOCKET (MK_ERRN const err)
 check on SOCKET-DOWN error …
 
bool MkErrorIsABORT (MK_ERRN const err)
 check on ABORT signal …
 
bool MkErrorIsTIMEOUT (MK_ERRN const err)
 check on TIMEOUT error …
 
bool MkErrorIsEXIT (MK_ERR const err)
 check on APPLICATION-EXIT error …
 

MkErrorC - MkErrorC_Signal_C_API - overload

#define MkErrorSetCONTINUE_0E()
 
#define MkErrorIsABORT_0E()
 
#define MkErrorIsABORT_1M(m)
 
#define MkErrorIsEXIT_0E()
 
#define MkErrorIsEXIT_1M(m)
 
#define MkErrorIsSOCKET_0E()
 
#define MkErrorIsSOCKET_1M(m)
 
#define MkErrorIsTIMEOUT_0E()
 
#define MkErrorIsTIMEOUT_1M(m)
 
#define MkErrorSetABORT_NULL(...)
 
#define MkErrorSetABORT(...)
 
#define MkErrorSetABORT_2E(...)
 
#define MkErrorSetABORT_3M(m, ...)
 
#define MkErrorSetABORT_2(err, detail)
 
#define MkErrorSetABORT_1E(detail)
 
#define MkErrorSetABORT_2M(err, detail)
 
#define MkErrorSetABORT_1(err)
 
#define MkErrorSetABORT_0E()
 
#define MkErrorSetABORT_1M(err)
 
#define MkErrorSetABORT_E(...)
 
#define MkErrorSetABORT_C(...)
 
#define MkErrorSetCONTINUE_NULL(...)
 
#define MkErrorSetCONTINUE(...)
 
#define MkErrorSetCONTINUE_0E()
 
#define MkErrorSetCONTINUE_1M(m)
 
#define MkErrorSetCode_NULL(...)
 
#define MkErrorSetCode(...)
 
#define MkErrorSetCode_1E(...)
 
#define MkErrorSetCode_2M(m, ...)
 
#define MkErrorSetEXIT_NULL(...)
 
#define MkErrorSetEXIT(...)
 
#define MkErrorSetEXIT_1E(...)
 
#define MkErrorSetEXIT_2M(m, ...)
 
#define MkErrorSetEXIT_1(err)
 
#define MkErrorSetEXIT_0E()
 
#define MkErrorSetEXIT_1M(err)
 
#define MkErrorSetEXIT_E(...)
 
#define MkErrorSetEXIT_C(...)
 
#define MkErrorSetSOCKET_NULL(...)
 
#define MkErrorSetSOCKET(...)
 
#define MkErrorSetSOCKET_2E(...)
 
#define MkErrorSetSOCKET_3M(m, ...)
 
#define MkErrorSetSOCKET_2(err, detail)
 
#define MkErrorSetSOCKET_1E(detail)
 
#define MkErrorSetSOCKET_2M(err, detail)
 
#define MkErrorSetSOCKET_1(err)
 
#define MkErrorSetSOCKET_0E()
 
#define MkErrorSetSOCKET_1M(err)
 
#define MkErrorSetSOCKET_E(...)
 
#define MkErrorSetSOCKET_C(...)
 

Detailed Description

MkErrorC - various functions to set and check a 'signal' on a MkErrorS

Macro Definition Documentation

◆ MkErrorIsABORT_0E

#define MkErrorIsABORT_0E ( )
Value:
bool MkErrorIsABORT(MK_ERRN const err)
check on ABORT signal …
#define MkERROR

Definition at line 1219 of file kernel_overload_mk.h.

◆ MkErrorIsABORT_1M

#define MkErrorIsABORT_1M ( m)
Value:

Definition at line 1220 of file kernel_overload_mk.h.

◆ MkErrorIsEXIT_0E

#define MkErrorIsEXIT_0E ( )
Value:
bool MkErrorIsEXIT(MK_ERR const err)
check on APPLICATION-EXIT error …

Definition at line 1221 of file kernel_overload_mk.h.

◆ MkErrorIsEXIT_1M

#define MkErrorIsEXIT_1M ( m)
Value:

Definition at line 1222 of file kernel_overload_mk.h.

◆ MkErrorIsSOCKET_0E

#define MkErrorIsSOCKET_0E ( )
Value:
bool MkErrorIsSOCKET(MK_ERRN const err)
check on SOCKET-DOWN error …

Definition at line 1223 of file kernel_overload_mk.h.

◆ MkErrorIsSOCKET_1M

#define MkErrorIsSOCKET_1M ( m)
Value:

Definition at line 1224 of file kernel_overload_mk.h.

◆ MkErrorIsTIMEOUT_0E

#define MkErrorIsTIMEOUT_0E ( )
Value:
bool MkErrorIsTIMEOUT(MK_ERRN const err)
check on TIMEOUT error …

Definition at line 1225 of file kernel_overload_mk.h.

◆ MkErrorIsTIMEOUT_1M

#define MkErrorIsTIMEOUT_1M ( m)
Value:

Definition at line 1226 of file kernel_overload_mk.h.

◆ MkErrorSetABORT

#define MkErrorSetABORT ( ...)
Value:
enum MkErrorE MkErrorSetABORT_RT(MK_RT mkrt, MK_ERR const err, MK_STRN const detail, MK_STRN const callfunc)
send the ABORT signal to the calling stack…
#define MK_RT_CALL

Definition at line 1228 of file kernel_overload_mk.h.

◆ MkErrorSetABORT_0E

#define MkErrorSetABORT_0E ( )
Value:
MkErrorSetABORT_2E("UNKNOWN",__func__)
#define MkErrorSetABORT_2E(...)

Definition at line 1235 of file kernel_overload_mk.h.

◆ MkErrorSetABORT_1

#define MkErrorSetABORT_1 ( err)
Value:
MkErrorSetABORT(err,"UNKNOWN",__func__)
#define MkErrorSetABORT(...)

Definition at line 1234 of file kernel_overload_mk.h.

◆ MkErrorSetABORT_1E

#define MkErrorSetABORT_1E ( detail)
Value:
MkErrorSetABORT_2E(detail,__func__)

Definition at line 1232 of file kernel_overload_mk.h.

◆ MkErrorSetABORT_1M

#define MkErrorSetABORT_1M ( err)
Value:
MkErrorSetABORT_3M(err,"UNKNOWN",__func__)
#define MkErrorSetABORT_3M(m,...)

Definition at line 1236 of file kernel_overload_mk.h.

◆ MkErrorSetABORT_2

#define MkErrorSetABORT_2 ( err,
detail )
Value:
MkErrorSetABORT(err,detail,__func__)

Definition at line 1231 of file kernel_overload_mk.h.

◆ MkErrorSetABORT_2E

#define MkErrorSetABORT_2E ( ...)
Value:
MkErrorSetABORT(&MkERROR,__VA_ARGS__)

Definition at line 1229 of file kernel_overload_mk.h.

◆ MkErrorSetABORT_2M

#define MkErrorSetABORT_2M ( err,
detail )
Value:
MkErrorSetABORT_3M(err,detail,__func__)

Definition at line 1233 of file kernel_overload_mk.h.

◆ MkErrorSetABORT_3M

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

Definition at line 1230 of file kernel_overload_mk.h.

◆ MkErrorSetABORT_C

#define MkErrorSetABORT_C ( ...)
Value:
if (MkErrorCheckI(MkErrorSetABORT(__VA_ARGS__)))
#define MkErrorCheckI(err)

Definition at line 1238 of file kernel_overload_mk.h.

◆ MkErrorSetABORT_E

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

Definition at line 1237 of file kernel_overload_mk.h.

◆ MkErrorSetABORT_NULL

#define MkErrorSetABORT_NULL ( ...)
Value:
#define MK_RT_CALL_NULL

Definition at line 1227 of file kernel_overload_mk.h.

◆ MkErrorSetCode

#define MkErrorSetCode ( ...)
Value:
void MkErrorSetCode_RT(MK_RT mkrt, MK_ERR const err, enum MkErrorE code)
set the MkErrorS::code value …

Definition at line 1244 of file kernel_overload_mk.h.

◆ MkErrorSetCode_1E

#define MkErrorSetCode_1E ( ...)
Value:
MkErrorSetCode(&MkERROR,__VA_ARGS__)
#define MkErrorSetCode(...)

Definition at line 1245 of file kernel_overload_mk.h.

◆ MkErrorSetCode_2M

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

Definition at line 1246 of file kernel_overload_mk.h.

◆ MkErrorSetCode_NULL

#define MkErrorSetCode_NULL ( ...)
Value:

Definition at line 1243 of file kernel_overload_mk.h.

◆ MkErrorSetCONTINUE

#define MkErrorSetCONTINUE ( ...)
Value:
void MkErrorSetCONTINUE_RT(MK_RT mkrt, MK_ERR const err)
signal end of processing in an MqMqEventIF callback …

Definition at line 1240 of file kernel_overload_mk.h.

◆ MkErrorSetCONTINUE_0E [1/2]

#define MkErrorSetCONTINUE_0E ( )
Value:
#define MkErrorSetCONTINUE(...)

Definition at line 1241 of file kernel_overload_mk.h.

◆ MkErrorSetCONTINUE_0E [2/2]

#define MkErrorSetCONTINUE_0E ( )
Value:

Definition at line 10971 of file LibMkKernel_mk.h.

◆ MkErrorSetCONTINUE_1M

#define MkErrorSetCONTINUE_1M ( m)
Value:

Definition at line 1242 of file kernel_overload_mk.h.

◆ MkErrorSetCONTINUE_NULL

#define MkErrorSetCONTINUE_NULL ( ...)
Value:

Definition at line 1239 of file kernel_overload_mk.h.

◆ MkErrorSetEXIT

#define MkErrorSetEXIT ( ...)
Value:
enum MkErrorE MkErrorSetEXIT_RT(MK_RT mkrt, MK_ERR const err, MK_STRN const callfunc)
finish the current callback, return to toplevel and MqExit the application …

Definition at line 1248 of file kernel_overload_mk.h.

◆ MkErrorSetEXIT_0E

#define MkErrorSetEXIT_0E ( )
Value:
#define MkErrorSetEXIT_1E(...)

Definition at line 1252 of file kernel_overload_mk.h.

◆ MkErrorSetEXIT_1

#define MkErrorSetEXIT_1 ( err)
Value:
MkErrorSetEXIT(err,__func__)
#define MkErrorSetEXIT(...)

Definition at line 1251 of file kernel_overload_mk.h.

◆ MkErrorSetEXIT_1E

#define MkErrorSetEXIT_1E ( ...)
Value:
MkErrorSetEXIT(&MkERROR,__VA_ARGS__)

Definition at line 1249 of file kernel_overload_mk.h.

◆ MkErrorSetEXIT_1M

#define MkErrorSetEXIT_1M ( err)
Value:
MkErrorSetEXIT_2M(err,__func__)
#define MkErrorSetEXIT_2M(m,...)

Definition at line 1253 of file kernel_overload_mk.h.

◆ MkErrorSetEXIT_2M

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

Definition at line 1250 of file kernel_overload_mk.h.

◆ MkErrorSetEXIT_C

#define MkErrorSetEXIT_C ( ...)
Value:
if (MkErrorCheckI(MkErrorSetEXIT(__VA_ARGS__)))

Definition at line 1255 of file kernel_overload_mk.h.

◆ MkErrorSetEXIT_E

#define MkErrorSetEXIT_E ( ...)
Value:

Definition at line 1254 of file kernel_overload_mk.h.

◆ MkErrorSetEXIT_NULL

#define MkErrorSetEXIT_NULL ( ...)
Value:

Definition at line 1247 of file kernel_overload_mk.h.

◆ MkErrorSetSOCKET

#define MkErrorSetSOCKET ( ...)
Value:
enum MkErrorE MkErrorSetSOCKET_RT(MK_RT mkrt, MK_ERR const err, MK_STRN const detail, MK_STRN const callfunc)
create SOCKET-DOWN error …

Definition at line 1257 of file kernel_overload_mk.h.

◆ MkErrorSetSOCKET_0E

#define MkErrorSetSOCKET_0E ( )
Value:
MkErrorSetSOCKET_2E("UNKNOWN",__func__)
#define MkErrorSetSOCKET_2E(...)

Definition at line 1264 of file kernel_overload_mk.h.

◆ MkErrorSetSOCKET_1

#define MkErrorSetSOCKET_1 ( err)
Value:
MkErrorSetSOCKET(err,"UNKNOWN",__func__)
#define MkErrorSetSOCKET(...)

Definition at line 1263 of file kernel_overload_mk.h.

◆ MkErrorSetSOCKET_1E

#define MkErrorSetSOCKET_1E ( detail)
Value:
MkErrorSetSOCKET_2E(detail,__func__)

Definition at line 1261 of file kernel_overload_mk.h.

◆ MkErrorSetSOCKET_1M

#define MkErrorSetSOCKET_1M ( err)
Value:
MkErrorSetSOCKET_3M(err,"UNKNOWN",__func__)
#define MkErrorSetSOCKET_3M(m,...)

Definition at line 1265 of file kernel_overload_mk.h.

◆ MkErrorSetSOCKET_2

#define MkErrorSetSOCKET_2 ( err,
detail )
Value:
MkErrorSetSOCKET(err,detail,__func__)

Definition at line 1260 of file kernel_overload_mk.h.

◆ MkErrorSetSOCKET_2E

#define MkErrorSetSOCKET_2E ( ...)
Value:

Definition at line 1258 of file kernel_overload_mk.h.

◆ MkErrorSetSOCKET_2M

#define MkErrorSetSOCKET_2M ( err,
detail )
Value:
MkErrorSetSOCKET_3M(err,detail,__func__)

Definition at line 1262 of file kernel_overload_mk.h.

◆ MkErrorSetSOCKET_3M

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

Definition at line 1259 of file kernel_overload_mk.h.

◆ MkErrorSetSOCKET_C

#define MkErrorSetSOCKET_C ( ...)
Value:
if (MkErrorCheckI(MkErrorSetSOCKET(__VA_ARGS__)))

Definition at line 1267 of file kernel_overload_mk.h.

◆ MkErrorSetSOCKET_E

#define MkErrorSetSOCKET_E ( ...)
Value:

Definition at line 1266 of file kernel_overload_mk.h.

◆ MkErrorSetSOCKET_NULL

#define MkErrorSetSOCKET_NULL ( ...)
Value:

Definition at line 1256 of file kernel_overload_mk.h.

Function Documentation

◆ MkErrorIsABORT()

bool MkErrorIsABORT ( MK_ERRN const err)

check on ABORT signal …

◆ MkErrorIsEXIT()

bool MkErrorIsEXIT ( MK_ERR const err)

check on APPLICATION-EXIT error …

The exit-error-object is made for two resons:

  1. The error is set by ErrorSetEXIT to signal end-of-application.
  2. The error is raised by a function to signal a fatal-error which require an application-exit.
    The only source of this kind of fatal-error is a link-target-abnormal-exit caused by a server/network crash.

The link-target-abnormal-exit can only occur for functions that perform a network-request, such as:

  • MqLinkCreate, MqLinkCreateChild, MqLinkConnect, MqSendEND, MqSendEND_AND_WAIT or MqProcessEvent

The aim of this function is to react to an exit-error-object and is used to ignore the error with an ErrorReset and then later to re-establish a connection with a MqLinkConnect.

  • Read more from the: example/c/Filter4.c example

Example "C": catch and ignore an EXIT return-code

if (MkErrorCheckI (MqSendEND_AND_WAIT (ctx, "TOKS", MK_TIMEOUT_USER))) {
}
#define MkErrorReset_1X(x)
#define MkErrorIsEXIT_0E()
@ MK_TIMEOUT_USER
request the user defined timeout value from the –timeout configuration value …

◆ MkErrorIsSOCKET()

bool MkErrorIsSOCKET ( MK_ERRN const err)

check on SOCKET-DOWN error …

◆ MkErrorIsTIMEOUT()

bool MkErrorIsTIMEOUT ( MK_ERRN const err)

check on TIMEOUT error …

◆ MkErrorSetABORT_RT()

enum MkErrorE MkErrorSetABORT_RT ( MK_RT mkrt,
MK_ERR const err,
MK_STRN const detail,
MK_STRN const callfunc )

send the ABORT signal to the calling stack…

The ABORT-signal is used to disrupt the current execution like an error and unwind the calling stack. The MkErrorIsABORT is used to detect the ABORT-signal and MkErrorReset is used to clear the ABORT-signal

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]detailadd additional detail information
[in]callfunca user-defined postfix to identify the calling-function or the environment (default = name-of-function, MK_NULL = resolve-own-name)

◆ MkErrorSetCode_RT()

void MkErrorSetCode_RT ( MK_RT mkrt,
MK_ERR const err,
enum MkErrorE code )

set the MkErrorS::code value …

◆ MkErrorSetCONTINUE_RT()

void MkErrorSetCONTINUE_RT ( MK_RT mkrt,
MK_ERR const err )

signal end of processing in an MqMqEventIF callback …

◆ MkErrorSetEXIT_RT()

enum MkErrorE MkErrorSetEXIT_RT ( MK_RT mkrt,
MK_ERR const err,
MK_STRN const callfunc )

finish the current callback, return to toplevel and MqExit the application …

To exit a application in a callback is a difficult task because the code is in-duty. To achieve this goal a special exit-error-object is created and reported to the toplevel. If a transaction is ongoing the MqSendRETURN is not called and thus the transaction is not finished. The calling application is informed later by a socket-down event. This only works for a parent-context. An exit in a child-context is ignored.

Example: raise an EXIT-exception in an ruby-service:

def EXIT
MkErrorC.DEFAULT().SetEXIT()
end
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, MK_NULL = resolve-own-name)

◆ MkErrorSetSOCKET_RT()

enum MkErrorE MkErrorSetSOCKET_RT ( MK_RT mkrt,
MK_ERR const err,
MK_STRN const detail,
MK_STRN const callfunc )

create SOCKET-DOWN error …

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]detailadd additional detail information
[in]callfunca user-defined postfix to identify the calling-function or the environment (default = name-of-function, MK_NULL = resolve-own-name)