theKernel 10.0
Loading...
Searching...
No Matches
MkErrorC_Misc_RB_API

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

+ Collaboration diagram for MkErrorC_Misc_RB_API:

Functions

static OT_ProcRet rbmkkernel_MkErrorC_Catch (MkErrorC_ARGS)
  Ruby: MkErrorC err.Catch(?exception:errorCode=nil?, ?callfunc:string="MK_NULL"?) C-API
convert a programming-language-error into an rbmkkernel error …
 
static OT_ProcRet rbmkkernel_MkErrorC_Cleanup (MkErrorC_ARGS)
  Ruby: err.Cleanup(?callfunc:string="MK_NULL"?, ?callline:int32=-1?) C-API
cleanup and print unwanted active error …
 
MK_DEPRECATED static MK_UNUSED OT_ProcRet rbmkkernel_MkErrorC_Log (MkErrorC_ARGS)
 
static OT_ProcRet rbmkkernel_MkErrorC_Println (MkErrorC_ARGS)
  Ruby: err.Println(?msg:string=""?, ?callfunc:string="MK_NULL"?, ?callline:int32=-1?) C-API
print the default-error to the MkLogFileC (default: stderr) and clear the error afterwards …
 
static OT_ProcRet rbmkkernel_MkErrorC_Reset (MkErrorC_ARGS)
  Ruby: err.Reset(?callfunc:string="MK_NULL"?, ?callline:int32=-1?, ?force:bool=false?) C-API
This function clears the err and resets to MK_OK
 
static OT_ProcRet rbmkkernel_MkErrorC_Stack (MkErrorC_ARGS)
  Ruby: MkErrorE err.Stack(?callfunc:string="MK_NULL"?, ?callfile:string="MK_NULL"?, ?callline:int32=-1?) C-API
check on error and if yes append an ErrorStackFormat to the error-message
 
static OT_ProcRet rbmkkernel_MkErrorC_StackFormat (MkErrorC_ARGS)
  Ruby: err.StackFormat(?callfunc:string="MK_NULL"?, ?callfile:string="MK_NULL"?, ?callline:int32=-1?) C-API
append an ensemble of func, file and line to the error-message
 
MK_DEPRECATED static MK_UNUSED OT_ProcRet rbmkkernel_MkErrorC_ToString (MkErrorC_ARGS)
 

Detailed Description

MkErrorC - various functions to 'work' on a MkErrorS

Function Documentation

◆ rbmkkernel_MkErrorC_Catch()

static OT_ProcRet rbmkkernel_MkErrorC_Catch ( MkErrorC_ARGS )
static

Ruby: MkErrorC err.Catch(?exception:errorCode=nil?, ?callfunc:string="MK_NULL"?) C-API
convert a programming-language-error into an rbmkkernel error …

Definition at line 322 of file MkErrorC_rb.c.

322 {
325 MK_EXP exception = NULL;
327 MK_STRN callfunc = NULL;
330 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
331 MK_ERR retVal = MkErrorCatchTmpl (hdl, exception, callfunc);
332 OT_retObj_SET_ERR(retVal);
333 end: MK_UNUSED /* LONG JUMP on error */
336}
#define OT_SETUP_VARARGS(min, max, d)
#define OT_FRAME_CLEANUP
#define OT_retObj_RETURN
#define OT_GET_CALL_PROC
#define OT_CHECK_OPTIONAL(val)
#define OT_retObj_SET_ERR(nat)
#define OT_CHECK_NOARGS
#define OT_CHECK_STRN(val)
#define OT_SETUP_hdl
Definition MkErrorC_rb.c:87
#define Catch_doc
#define MkErrorCatchTmpl(...)
#define MK_UNUSED
mark unnused variables and functions
const MK_STRB * MK_STRN
constant string pointer data-type
MK_PTRB const * MK_EXP
exception object pointer
static bool MkSysStringIsNULL(MK_STRN str)
test if string is NULL or EMPTY …
#define OT_CHECK_EXP(val)
The data-type to store and handle the error-condition …

◆ rbmkkernel_MkErrorC_Cleanup()

static OT_ProcRet rbmkkernel_MkErrorC_Cleanup ( MkErrorC_ARGS )
static

Ruby: err.Cleanup(?callfunc:string="MK_NULL"?, ?callline:int32=-1?) C-API
cleanup and print unwanted active error …

Definition at line 341 of file MkErrorC_rb.c.

341 {
344 MK_STRN callfunc = NULL;
346 MK_I32 callline = -1;
349 if (callline == -1 ) {callline = OT_GET_CALL_LINE;}
350 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
351 MkErrorCleanup (hdl, callfunc, callline);
353 end: MK_UNUSED /* LONG JUMP on error */
356}
#define OT_CHECK_NI4(val)
#define OT_GET_CALL_LINE
#define OT_retObj_SET_None
#define Cleanup_doc
#define MkErrorCleanup(...)
signed int MK_I32
4 byte integer data-type

◆ rbmkkernel_MkErrorC_Log()

MK_DEPRECATED static MK_UNUSED OT_ProcRet rbmkkernel_MkErrorC_Log ( MkErrorC_ARGS )
static

Definition at line 360 of file MkErrorC_rb.c.

#define OT_ERROR_LNG_RETURN

◆ rbmkkernel_MkErrorC_Println()

static OT_ProcRet rbmkkernel_MkErrorC_Println ( MkErrorC_ARGS )
static

Ruby: err.Println(?msg:string=""?, ?callfunc:string="MK_NULL"?, ?callline:int32=-1?) C-API
print the default-error to the MkLogFileC (default: stderr) and clear the error afterwards …

Definition at line 363 of file MkErrorC_rb.c.

363 {
366 MK_STRN msg = "";
368 MK_STRN callfunc = NULL;
370 MK_I32 callline = -1;
373 if (callline == -1 ) {callline = OT_GET_CALL_LINE;}
374 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
375 MkErrorPrintln (hdl, msg, callfunc, callline);
377 end: MK_UNUSED /* LONG JUMP on error */
380}
#define Println_doc
#define MkErrorPrintln(...)

◆ rbmkkernel_MkErrorC_Reset()

static OT_ProcRet rbmkkernel_MkErrorC_Reset ( MkErrorC_ARGS )
static

Ruby: err.Reset(?callfunc:string="MK_NULL"?, ?callline:int32=-1?, ?force:bool=false?) C-API
This function clears the err and resets to MK_OK

Definition at line 383 of file MkErrorC_rb.c.

383 {
386 MK_STRN callfunc = NULL;
388 MK_I32 callline = -1;
390 MK_BOOL force = false;
393 if (callline == -1 ) {callline = OT_GET_CALL_LINE;}
394 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
395 MkErrorC_Check(hdl,MkErrorReset (hdl, callfunc, callline, force));
397 end: MK_UNUSED /* LONG JUMP on error */
400}
#define OT_CHECK_bool(val)
#define MkErrorC_Check(mng, PROC)
#define Reset_doc
#define MkErrorReset(...)
bool MK_BOOL
real bool data-type

◆ rbmkkernel_MkErrorC_Stack()

static OT_ProcRet rbmkkernel_MkErrorC_Stack ( MkErrorC_ARGS )
static

Ruby: MkErrorE err.Stack(?callfunc:string="MK_NULL"?, ?callfile:string="MK_NULL"?, ?callline:int32=-1?) C-API
check on error and if yes append an ErrorStackFormat to the error-message

Definition at line 403 of file MkErrorC_rb.c.

403 {
406 MK_STRN callfunc = NULL;
408 MK_STRN callfile = NULL;
410 MK_I32 callline = -1;
413 if (callline == -1 ) {callline = OT_GET_CALL_LINE;}
414 if (MkSysStringIsNULL(callfile)) {callfile = OT_GET_CALL_FILE;}
415 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
416 OT_retObj_SET(OT_NEW_Mk_enum_OBJ(ErrorE,MkErrorStack (hdl, callfunc, callfile, callline)));
417 end: MK_UNUSED /* LONG JUMP on error */
420}
#define OT_NEW_Mk_enum_OBJ(typ, i)
#define OT_GET_CALL_FILE
#define OT_retObj_SET(val)
#define Stack_doc
#define OT_SETUP_hdl__null_allow
Definition MkErrorC_rb.c:88
#define MkErrorStack(...)

◆ rbmkkernel_MkErrorC_StackFormat()

static OT_ProcRet rbmkkernel_MkErrorC_StackFormat ( MkErrorC_ARGS )
static

Ruby: err.StackFormat(?callfunc:string="MK_NULL"?, ?callfile:string="MK_NULL"?, ?callline:int32=-1?) C-API
append an ensemble of func, file and line to the error-message

Definition at line 423 of file MkErrorC_rb.c.

423 {
426 MK_STRN callfunc = NULL;
428 MK_STRN callfile = NULL;
430 MK_I32 callline = -1;
433 if (callline == -1 ) {callline = OT_GET_CALL_LINE;}
434 if (MkSysStringIsNULL(callfile)) {callfile = OT_GET_CALL_FILE;}
435 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
436 MkErrorStackFormat (hdl, callfunc, callfile, callline);
438 end: MK_UNUSED /* LONG JUMP on error */
441}
#define StackFormat_doc
#define MkErrorStackFormat(...)

◆ rbmkkernel_MkErrorC_ToString()

MK_DEPRECATED static MK_UNUSED OT_ProcRet rbmkkernel_MkErrorC_ToString ( MkErrorC_ARGS )
static

Definition at line 445 of file MkErrorC_rb.c.