Loading...
Searching...
No Matches
MqContextC_ErrorApi_C_API

MqContextC - move and copy an error from a contextMore...

+ Collaboration diagram for MqContextC_ErrorApi_C_API:

Functions

MQ_EXTERN enum MkErrorE MqContextErrorCopy_RT (MK_RT const mkrt, MQ_CTXN const targetCtx, MQ_CTXN const sourceCtx)
 copy a MkErrorS from the sourceCtx to the targetCtx
 
MQ_EXTERN enum MkErrorE MqContextErrorMove_RT (MK_RT const mkrt, MQ_CTXN const targetCtx, MQ_CTXN const sourceCtx)
 move a MkErrorS from the sourceCtx to the targetCtx
 

MqContextC - MqContextC_ErrorApi_Error_C_API - function

MK_ERR MqContextErrorFORMATP (MQ_CTXN const fmtobj)
 Non-inline replacement for MqContextErrorFORMAT
 

MqContextC - MqContextC_ErrorApi_Error_C_API - overload

#define MqContextErrorFORMAT_0()
 
#define MqContextErrorCopy_NULL(...)
 
#define MqContextErrorCopy(...)
 
#define MqContextErrorCopy_E(...)
 
#define MqContextErrorCopy_C(...)
 
#define MqContextErrorMove_NULL(...)
 
#define MqContextErrorMove(...)
 
#define MqContextErrorMove_E(...)
 
#define MqContextErrorMove_C(...)
 

Detailed Description

MqContextC - move and copy an error from a context

Macro Definition Documentation

◆ MqContextErrorCopy

#define MqContextErrorCopy ( ...)
Value:
#define MK_RT_CALL
MQ_EXTERN enum MkErrorE MqContextErrorCopy_RT(MK_RT const mkrt, MQ_CTXN const targetCtx, MQ_CTXN const sourceCtx)
copy a MkErrorS from the sourceCtx to the targetCtx …

Definition at line 185 of file msgque_overload_mq.h.

◆ MqContextErrorCopy_C

#define MqContextErrorCopy_C ( ...)
Value:
if (MkErrorCheckI(MqContextErrorCopy(__VA_ARGS__)))
#define MqContextErrorCopy(...)

Definition at line 187 of file msgque_overload_mq.h.

◆ MqContextErrorCopy_E

#define MqContextErrorCopy_E ( ...)
Value:
MkErrorCheck(MqContextErrorCopy(__VA_ARGS__))

Definition at line 186 of file msgque_overload_mq.h.

◆ MqContextErrorCopy_NULL

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

Definition at line 184 of file msgque_overload_mq.h.

◆ MqContextErrorFORMAT_0

#define MqContextErrorFORMAT_0 ( )
Value:
MK_ERR MqContextErrorFORMAT(MQ_CTXN const fmtobj)
helper used to access MkErrorDEFAULT from MqContextC

Definition at line 181 of file msgque_overload_mq.h.

◆ MqContextErrorMove

#define MqContextErrorMove ( ...)
Value:
MQ_EXTERN enum MkErrorE MqContextErrorMove_RT(MK_RT const mkrt, MQ_CTXN const targetCtx, MQ_CTXN const sourceCtx)
move a MkErrorS from the sourceCtx to the targetCtx …

Definition at line 189 of file msgque_overload_mq.h.

◆ MqContextErrorMove_C

#define MqContextErrorMove_C ( ...)
Value:
if (MkErrorCheckI(MqContextErrorMove(__VA_ARGS__)))
#define MqContextErrorMove(...)

Definition at line 191 of file msgque_overload_mq.h.

◆ MqContextErrorMove_E

#define MqContextErrorMove_E ( ...)
Value:
MkErrorCheck(MqContextErrorMove(__VA_ARGS__))

Definition at line 190 of file msgque_overload_mq.h.

◆ MqContextErrorMove_NULL

#define MqContextErrorMove_NULL ( ...)
Value:

Definition at line 188 of file msgque_overload_mq.h.

Function Documentation

◆ MqContextErrorCopy_RT()

MQ_EXTERN enum MkErrorE MqContextErrorCopy_RT ( MK_RT const mkrt,
MQ_CTXN const targetCtx,
MQ_CTXN const sourceCtx )

copy a MkErrorS from the sourceCtx to the targetCtx

In pymqmsgque the a MkRuntimeC is only one error-object per thread but this error-object has also addiitional attributes to identify the source of the error. In addition the pymqmsgque has also an extended-error-object MqErrorS which also has error-specific-attributes. The MqContextErrorCopy is used to copy an error frome sourceCtx to targetCtx and keep the additional attributes in sync.

Note
  • by default… every error set in a slave is also set in the master.
  • by default… the error is only copied if sourceCtx and targetCtx are different.
  • by default… the error is not copied if targetCtx MqConfigS::master of sourceCtx.
  • by default… the copy only happen if sourceCtx has an error.
  • on copy… the error of sourceCtx will be reset.
See also
MqContextErrorMove
Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
targetCtxthe MqContextC object and the target of the error
sourceCtxthe MqContextC object and the source of the error

◆ MqContextErrorFORMATP()

MK_ERR MqContextErrorFORMATP ( MQ_CTXN const fmtobj)
extern

Non-inline replacement for MqContextErrorFORMAT

◆ MqContextErrorMove_RT()

MQ_EXTERN enum MkErrorE MqContextErrorMove_RT ( MK_RT const mkrt,
MQ_CTXN const targetCtx,
MQ_CTXN const sourceCtx )

move a MkErrorS from the sourceCtx to the targetCtx

Note
  • by default… every error set in a slave is also set in the master.
  • by default… the error is only copied if sourceCtx and targetCtx are different.
  • by default… the error is not copied if targetCtx MqConfigS::master of sourceCtx.
  • by default… the copy only happen if sourceCtx has an error.
  • on copy… the error of sourceCtx will be reset.
See also
MqContextErrorCopy
Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
targetCtxthe MqContextC object and the target of the error
sourceCtxthe MqContextC object and the source of the error and cleared