theSq3Lite 10.0
Loading...
Searching...
No Matches
Sq3Lite_Error_C_API

Sq3Lite PACKAGE - work with an errorMore...

+ Collaboration diagram for Sq3Lite_Error_C_API:

Macros

#define Sq3ErrorE_Check(sq3_hdl, PROC)
 check on a jvsq3lite error and convert into a jvsq3lite error …
 
#define Sq3ErrorE_Check_Package(PROC)
 
#define Sq3ErrorE_Check_Static(cls_hdl, PROC)
 
#define Sq3ErrorE_Check_Ctor(__cls, __hdl, PROC)
 

Functions

static bool Sq3ErrorCheckI (enum Sq3ErrorE ret)
 check if ret signal an error
 
enum MkErrorE Sq3LiteErrorToMQ (MK_OBJN const obj, MK_STRN const func, MK_STRN const file, MK_I32 const line)
 if a jvsq3lite funtion return a MkErrorE use this function to convert the libsq3lite-error into the libmkkernel-error
 

Sq3Lite - Sq3Lite_Error_C_API - function

MK_BOOL Sq3ErrorCheckIP (enum Sq3ErrorE ret)
 Non-inline replacement for Sq3ErrorCheckI
 

Detailed Description

Sq3Lite PACKAGE - work with an error

Error handling in jvsq3lite.

The error signals the end of an operation with an undesirable result or state.

Macro Definition Documentation

◆ Sq3ErrorE_Check

#define Sq3ErrorE_Check ( sq3_hdl,
PROC )
Value:
if (unlikely(Sq3ErrorCheckI(PROC))) { \
Sq3LiteErrorToMQ(MkOBJ(sq3_hdl), __func__,__FILE__,__LINE__); \
goto error; \
} \
#define unlikely(x)
#define MkOBJ(x)
static bool Sq3ErrorCheckI(enum Sq3ErrorE ret)
check if ret signal an error …

check on a jvsq3lite error and convert into a jvsq3lite error …

Parameters
[in]sq3_hdlthe instance to work on CLASS
[in]PROCthe function to return the error, only eval once.
Returns
on error jump to label error:

Definition at line 459 of file LibSq3Lite_sq3.h.

459#define Sq3ErrorE_Check(sq3_hdl,PROC) \
460 if (unlikely(Sq3ErrorCheckI(PROC))) { \
461 Sq3LiteErrorToMQ(MkOBJ(sq3_hdl), __func__,__FILE__,__LINE__); \
462 goto error; \
463 } \
464

◆ Sq3ErrorE_Check_Ctor

#define Sq3ErrorE_Check_Ctor ( __cls,
__hdl,
PROC )
Value:
if (unlikely(Sq3ErrorCheckI(PROC))) { \
Sq3LiteErrorToMQ(__hdl?MkOBJ(__hdl):MkOBJ(__cls), __func__,__FILE__,__LINE__); \
goto error; \
}

Definition at line 477 of file LibSq3Lite_sq3.h.

477#define Sq3ErrorE_Check_Ctor(__cls, __hdl, PROC) \
478 if (unlikely(Sq3ErrorCheckI(PROC))) { \
479 Sq3LiteErrorToMQ(__hdl?MkOBJ(__hdl):MkOBJ(__cls), __func__,__FILE__,__LINE__); \
480 goto error; \
481 }

◆ Sq3ErrorE_Check_Package

#define Sq3ErrorE_Check_Package ( PROC)
Value:
if (unlikely(Sq3ErrorCheckI(PROC))) { \
Sq3LiteErrorToMQ(MK_ERROR_DEFAULT_NULL, __func__,__FILE__,__LINE__); \
goto error; \
}
#define MK_ERROR_DEFAULT_NULL

Definition at line 465 of file LibSq3Lite_sq3.h.

465#define Sq3ErrorE_Check_Package(PROC) \
466 if (unlikely(Sq3ErrorCheckI(PROC))) { \
467 Sq3LiteErrorToMQ(MK_ERROR_DEFAULT_NULL, __func__,__FILE__,__LINE__); \
468 goto error; \
469 }

◆ Sq3ErrorE_Check_Static

#define Sq3ErrorE_Check_Static ( cls_hdl,
PROC )
Value:
if (unlikely(Sq3ErrorCheckI(PROC))) { \
Sq3LiteErrorToMQ(MkOBJ(cls_hdl), __func__,__FILE__,__LINE__); \
goto error; \
}

Definition at line 471 of file LibSq3Lite_sq3.h.

471#define Sq3ErrorE_Check_Static(cls_hdl, PROC) \
472 if (unlikely(Sq3ErrorCheckI(PROC))) { \
473 Sq3LiteErrorToMQ(MkOBJ(cls_hdl), __func__,__FILE__,__LINE__); \
474 goto error; \
475 }

Function Documentation

◆ Sq3ErrorCheckI()

static bool Sq3ErrorCheckI ( enum Sq3ErrorE ret)
inlinestatic

check if ret signal an error

Parameters
[in]retinput for jvsq3lite error-check
Returns
true if ret is an error otherwise false

Definition at line 449 of file LibSq3Lite_sq3.h.

449 {
450 return ((ret) > SQ3_RESULT_OK && (ret) < SQ3_RESULT_ROW) ;
451}
@ SQ3_RESULT_OK
@ SQ3_RESULT_ROW
+ Here is the caller graph for this function:

◆ Sq3ErrorCheckIP()

MK_BOOL Sq3ErrorCheckIP ( enum Sq3ErrorE ret)

Non-inline replacement for Sq3ErrorCheckI

◆ Sq3LiteErrorToMQ()

enum MkErrorE Sq3LiteErrorToMQ ( MK_OBJN const obj,
MK_STRN const func,
MK_STRN const file,
MK_I32 const line )

if a jvsq3lite funtion return a MkErrorE use this function to convert the libsq3lite-error into the libmkkernel-error