theSq3Lite 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard - theLib - theATL
c - tcl - atl - cs - py - rb - jv - cc
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 rbsq3lite error and convert into a rbsq3lite 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 rbsq3lite 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 rbsq3lite.

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 rbsq3lite error and convert into a rbsq3lite 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 462 of file LibSq3Lite_sq3.h.

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

◆ 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 480 of file LibSq3Lite_sq3.h.

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

◆ 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 468 of file LibSq3Lite_sq3.h.

468#define Sq3ErrorE_Check_Package(PROC) \
469 if (unlikely(Sq3ErrorCheckI(PROC))) { \
470 Sq3LiteErrorToMQ(MK_ERROR_DEFAULT_NULL, __func__,__FILE__,__LINE__); \
471 goto error; \
472 }

◆ 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 474 of file LibSq3Lite_sq3.h.

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

Function Documentation

◆ Sq3ErrorCheckI()

static bool Sq3ErrorCheckI ( enum Sq3ErrorE ret)
inlinestatic

check if ret signal an error

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

Definition at line 452 of file LibSq3Lite_sq3.h.

452 {
453 return ((ret) > SQ3_RESULT_OK && (ret) < SQ3_RESULT_ROW) ;
454}
@ 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 rbsq3lite funtion return a MkErrorE use this function to convert the libsq3lite-error into the libmkkernel-error