theKernel 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - py - rb - jv - cc
Loading...
Searching...
No Matches
MkErrorC_System_C_API

MkErrorC - various functions to raise a 'System' messagen on MkErrorSMore...

+ Collaboration diagram for MkErrorC_System_C_API:

MkErrorDEFAULT

default-system-error - default-error

The default-error is defined once per runtime and is used as only-valid-source of an MkErrorC in a thread or process.

See also
ErrorFORMAT, ErrorPRINT, ErrorIGNORE, MkErrorPANIC
MK_ERR MkErrorDEFAULT_RT (MK_PARSER_RT_ONLY)
 default-system-error - default-error
 
#define MK_ERROR_DEFAULT_R(r)
 return as MK_OBJ, to return MK_ERR use MkERROR (R,RT,O,X,XN) or MkErrorDEFAULT ...
 
#define MK_ERROR_DEFAULT   MK_ERROR_DEFAULT_R(&MK_RT_REF)
 
#define MK_ERROR_DEFAULT_X(x)
 
#define MK_ERROR_DEFAULT_NULL   MK_ERROR_DEFAULT_R(&MkRuntimeRLS)
 

MkErrorPanik

panic-system-error - panic on next error …

If the panic-system-error is used as the format-obj of an error-message, the text is formated as usual, but the default-error is not set, instead a MkPanicVL is called and the application terminates.

MkErrorPANIC - usage

Set the MkErrorS::format_of_error attribute to PANIC. The next error-message will be formated as usual and than be reported using MkPanicVL. With MkPanicVL the error will be printed to MkLogFileC (default: stderr) and the application will abort.

Returns
the default-error with MkErrorS::format_of_error attribute set
See also
ErrorDEFAULT, ErrorPRINT, ErrorIGNORE, MkErrorPANIC
MK_ERR MkErrorPANIC_RT (MK_PARSER_RT_ONLY)
 panic-system-error - panic on next error …
 
#define MK_ERROR_PANIC_R(r)
 
#define MK_ERROR_PANIC   MK_ERROR_PANIC_R(&MK_RT_REF)
 
#define MK_ERROR_PANIC_X(x)
 
#define MK_ERROR_PANIC_NULL   MK_ERROR_PANIC_R(&MkRuntimeRLS)
 use MkRuntimeRLS as runtime
 

MkErrorIgnore

ignore-system-error - ignore the next error …

The next error will be ignored, no formatting will be performed and the the default-error will not be modified.

MkErrorIGNORE - usage

There are two functions to suppress an error: MkErrorIGNORE and MkErrorNoRaise.

MkErrorIGNORE
Set the MkErrorS::format_of_error attribute to IGNORE. The next error will be ignored, no formatting will be performed and the the default-error will not be modified.
MkErrorNoRaise
Set the MkErrorS::noRaise attribute to TRUE. The next error will be set as usual but not raised. This is usefull to set an error and later append additional information to the error. Final the error have to be raised with MkErrorRaise.
Returns
the default-error with MkErrorS::format_of_error attribute set
See also
ErrorDEFAULT, ErrorPRINT, ErrorIGNORE, MkErrorPANIC
MK_ERR MkErrorIGNORE_RT (MK_PARSER_RT_ONLY)
 ignore-system-error - ignore the next error …
 
#define MK_ERROR_IGNORE_R(r)
 
#define MK_ERROR_IGNORE   MK_ERROR_IGNORE_R(&MK_RT_REF)
 
#define MK_ERROR_IGNORE_X(x)
 
#define MK_ERROR_IGNORE_XN(x)
 
#define MK_ERROR_IGNORE_NULL   MK_ERROR_IGNORE_R(&MkRuntimeRLS)
 use MkRuntimeRLS as runtime
 

MkErrorPrintln

ignore-system-error - print the next error into MkLogFileC

The next error-message will be formated as usual and than be reported using MkLogVL. The default-error will not be modified.

MkErrorPRINT - usage

Set the MkErrorS::format_of_error attribute to PRINT.

Returns
the default-error with MkErrorS::format_of_error attribute set
See also
ErrorDEFAULT, ErrorPRINT, ErrorIGNORE, MkErrorPANIC
MK_ERR MkErrorPRINT_RT (MK_PARSER_RT_ONLY)
 ignore-system-error - print the next error into MkLogFileC
 
#define MK_ERROR_PRINT_R(r)
 
#define MK_ERROR_PRINT   MK_ERROR_PRINT_R(&MK_RT_REF)
 
#define MK_ERROR_PRINT_X(x)
 
#define MK_ERROR_PRINT_NULL   MK_ERROR_PRINT_R(&MkRuntimeRLS)
 use MkRuntimeRLS as runtime
 

MkErrorFORMAT

system-error-format - format and return the default-error

Returns
the MkErrorS::format_of_error or MkErrorS::source_of_error attribute

MkErrorFORMAT - usage

Set the MkErrorS::format_of_error attribute to fmtobj or MK_NULL. The next error-message will be formated as usual and than be raised as error. The default-error will be modified.

The next error-message created with ErrorSetC etc is formatted with MkRuntimeS->cid ("context-in-duty") or simply as "DEFAULT" if cid == NULL.

Parameters
[in]fmtobjmanaged object used to format the log-message (default=MK_NULL → use default-format)
Returns
the default-error with MkErrorS::format_of_error attribute set
See also
ErrorDEFAULT, ErrorPRINT, ErrorIGNORE, MkErrorPANIC
MK_EXTERN MK_ERR MkErrorFORMAT (MK_OBJN fmtobj)
 system-error-format - format and return the default-error
 
MK_EXTERN MK_ERR MkErrorFORMAT_EO (MK_OBJN fmtobj)
 same as (static,runtime) MK_ERR MkErrorDEFAULT() but do not set the MkERROR.format_of_error attribute on errobj==NULL
 
#define MK_ERROR_FORMAT_R(r)
 
#define MK_ERROR_FORMAT   MK_ERROR_FORMAT_R(&MK_RT_REF)
 
#define MK_ERROR_FORMAT_X(x)
 
#define MK_ERROR_FORMAT_NULL   MK_ERROR_FORMAT_R(&MkRuntimeRLS)
 use MkRuntimeRLS as runtime
 
#define MkErrorFORMAT_1M(m)
 
#define MkErrorFORMAT_1X(x)
 
#define MkErrorFORMAT_1O(o)
 

MkErrorC - MkErrorC_System_C_API - function

MK_EXTERN MK_ERR MkErrorDEFAULTP (MK_PARSER_RT_ONLY)
 Non-inline replacement for MkErrorDEFAULT
 
MK_EXTERN MK_ERR MkErrorIGNOREP (MK_PARSER_RT_ONLY)
 Non-inline replacement for MkErrorIGNORE
 
MK_EXTERN MK_ERR MkErrorPANICP (MK_PARSER_RT_ONLY)
 Non-inline replacement for MkErrorPANIC
 
MK_EXTERN MK_ERR MkErrorPRINTP (MK_PARSER_RT_ONLY)
 Non-inline replacement for MkErrorPRINT
 

MkERROR

access the predefined error from MkRuntimeC as MK_ERR

#define MkERROR_R(r)
 
#define MkERROR   MkERROR_R(&MK_RT_REF)
 
#define MkERROR_RT   MkERROR_R(&MK_RT_REF)
 
#define MkERROR_O(o)
 
#define MkERROR_X(x)
 
#define MkERROR_XN(x)
 
#define MkERROR_NULL   MkERROR_R(&MkRuntimeRLS)
 

MkErrorC - MkErrorC_System_C_API - overload

#define MkErrorDEFAULT_NULL()
 
#define MkErrorDEFAULT()
 
#define MkErrorFORMAT_0()
 
#define MkErrorFORMAT_EO_0()
 
#define MkErrorIGNORE_NULL()
 
#define MkErrorIGNORE()
 
#define MkErrorPANIC_NULL()
 
#define MkErrorPANIC()
 
#define MkErrorPRINT_NULL()
 
#define MkErrorPRINT()
 

Detailed Description

MkErrorC - various functions to raise a 'System' messagen on MkErrorS

Macro Definition Documentation

◆ MK_ERROR_DEFAULT

#define MK_ERROR_DEFAULT   MK_ERROR_DEFAULT_R(&MK_RT_REF)

Definition at line 10028 of file LibMkKernel_mk.h.

◆ MK_ERROR_DEFAULT_NULL

#define MK_ERROR_DEFAULT_NULL   MK_ERROR_DEFAULT_R(&MkRuntimeRLS)

Definition at line 10030 of file LibMkKernel_mk.h.

◆ MK_ERROR_DEFAULT_R

#define MK_ERROR_DEFAULT_R ( r)
Value:
MkOBJ(&(*r).error_mk)
#define MkOBJ(x)
cast a known-object into an MkObjectS pointer

return as MK_OBJ, to return MK_ERR use MkERROR (R,RT,O,X,XN) or MkErrorDEFAULT ...

Definition at line 10027 of file LibMkKernel_mk.h.

◆ MK_ERROR_DEFAULT_X

#define MK_ERROR_DEFAULT_X ( x)
Value:
#define MK_ERROR_DEFAULT_R(r)
return as MK_OBJ, to return MK_ERR use MkERROR (R,RT,O,X,XN) or MkErrorDEFAULT ...
#define MkRT_X(x)

Definition at line 10029 of file LibMkKernel_mk.h.

◆ MK_ERROR_FORMAT

#define MK_ERROR_FORMAT   MK_ERROR_FORMAT_R(&MK_RT_REF)

Definition at line 10149 of file LibMkKernel_mk.h.

◆ MK_ERROR_FORMAT_NULL

#define MK_ERROR_FORMAT_NULL   MK_ERROR_FORMAT_R(&MkRuntimeRLS)

use MkRuntimeRLS as runtime

Definition at line 10152 of file LibMkKernel_mk.h.

◆ MK_ERROR_FORMAT_R

#define MK_ERROR_FORMAT_R ( r)
Value:
((*r).error_mk.format_of_error ? (*r).error_mk.format_of_error : \
MkObjN((*r).error_mk.source_of_error) ? MkObjN((*r).error_mk.source_of_error) : \
MK_OBJN MkObjN(MK_MNGN mng)
(const) cast a unknown-object into an MkObjectS pointer or NULL if not possible

Definition at line 10146 of file LibMkKernel_mk.h.

10146#define MK_ERROR_FORMAT_R(r) ((*r).error_mk.format_of_error ? (*r).error_mk.format_of_error : \
10147 MkObjN((*r).error_mk.source_of_error) ? MkObjN((*r).error_mk.source_of_error) : \
10148 MK_ERROR_DEFAULT_R(r))

◆ MK_ERROR_FORMAT_X

#define MK_ERROR_FORMAT_X ( x)
Value:
#define MK_ERROR_FORMAT_R(r)

Definition at line 10150 of file LibMkKernel_mk.h.

◆ MK_ERROR_IGNORE

#define MK_ERROR_IGNORE   MK_ERROR_IGNORE_R(&MK_RT_REF)

Definition at line 10079 of file LibMkKernel_mk.h.

◆ MK_ERROR_IGNORE_NULL

#define MK_ERROR_IGNORE_NULL   MK_ERROR_IGNORE_R(&MkRuntimeRLS)

use MkRuntimeRLS as runtime

Definition at line 10083 of file LibMkKernel_mk.h.

◆ MK_ERROR_IGNORE_R

#define MK_ERROR_IGNORE_R ( r)
Value:
MkOBJ(&(*r).error_ignore)

Definition at line 10078 of file LibMkKernel_mk.h.

◆ MK_ERROR_IGNORE_X

#define MK_ERROR_IGNORE_X ( x)
Value:
#define MK_ERROR_IGNORE_R(r)

Definition at line 10080 of file LibMkKernel_mk.h.

◆ MK_ERROR_IGNORE_XN

#define MK_ERROR_IGNORE_XN ( x)
Value:
#define MkRT_XN(x)

Definition at line 10081 of file LibMkKernel_mk.h.

◆ MK_ERROR_PANIC

#define MK_ERROR_PANIC   MK_ERROR_PANIC_R(&MK_RT_REF)

Definition at line 10048 of file LibMkKernel_mk.h.

◆ MK_ERROR_PANIC_NULL

#define MK_ERROR_PANIC_NULL   MK_ERROR_PANIC_R(&MkRuntimeRLS)

use MkRuntimeRLS as runtime

Definition at line 10051 of file LibMkKernel_mk.h.

◆ MK_ERROR_PANIC_R

#define MK_ERROR_PANIC_R ( r)
Value:
MkOBJ(&(*r).error_panic)

Definition at line 10047 of file LibMkKernel_mk.h.

◆ MK_ERROR_PANIC_X

#define MK_ERROR_PANIC_X ( x)
Value:
#define MK_ERROR_PANIC_R(r)

Definition at line 10049 of file LibMkKernel_mk.h.

◆ MK_ERROR_PRINT

#define MK_ERROR_PRINT   MK_ERROR_PRINT_R(&MK_RT_REF)

Definition at line 10119 of file LibMkKernel_mk.h.

◆ MK_ERROR_PRINT_NULL

#define MK_ERROR_PRINT_NULL   MK_ERROR_PRINT_R(&MkRuntimeRLS)

use MkRuntimeRLS as runtime

Definition at line 10122 of file LibMkKernel_mk.h.

◆ MK_ERROR_PRINT_R

#define MK_ERROR_PRINT_R ( r)
Value:
MkOBJ(&(*r).error_print)

Definition at line 10118 of file LibMkKernel_mk.h.

◆ MK_ERROR_PRINT_X

#define MK_ERROR_PRINT_X ( x)
Value:
#define MK_ERROR_PRINT_R(r)

Definition at line 10120 of file LibMkKernel_mk.h.

◆ MkERROR

#define MkERROR   MkERROR_R(&MK_RT_REF)

Definition at line 10014 of file LibMkKernel_mk.h.

◆ MkERROR_NULL

#define MkERROR_NULL   MkERROR_R(&MkRuntimeRLS)

Definition at line 10019 of file LibMkKernel_mk.h.

◆ MkERROR_O

#define MkERROR_O ( o)
Value:
#define MkERROR_R(r)
#define MkRT_O(o)

Definition at line 10016 of file LibMkKernel_mk.h.

◆ MkERROR_R

#define MkERROR_R ( r)
Value:
((*r).error_mk)

Definition at line 10013 of file LibMkKernel_mk.h.

◆ MkERROR_RT

#define MkERROR_RT   MkERROR_R(&MK_RT_REF)

Definition at line 10015 of file LibMkKernel_mk.h.

◆ MkERROR_X

#define MkERROR_X ( x)
Value:

Definition at line 10017 of file LibMkKernel_mk.h.

◆ MkERROR_XN

#define MkERROR_XN ( x)
Value:

Definition at line 10018 of file LibMkKernel_mk.h.

◆ MkErrorDEFAULT

#define MkErrorDEFAULT ( )
Value:
MK_ERR MkErrorDEFAULT_RT(MK_PARSER_RT_ONLY)
default-system-error - default-error …
#define MK_RT_CALL_ONLY

Definition at line 1258 of file kernel_overload_mk.h.

◆ MkErrorDEFAULT_NULL

#define MkErrorDEFAULT_NULL ( )
Value:

Definition at line 1257 of file kernel_overload_mk.h.

◆ MkErrorFORMAT_0

#define MkErrorFORMAT_0 ( )
Value:
MK_EXTERN MK_ERR MkErrorFORMAT(MK_OBJN fmtobj)
system-error-format - format and return the default-error …

Definition at line 1259 of file kernel_overload_mk.h.

◆ MkErrorFORMAT_1M

#define MkErrorFORMAT_1M ( m)
Value:

Definition at line 10175 of file LibMkKernel_mk.h.

◆ MkErrorFORMAT_1O

#define MkErrorFORMAT_1O ( o)
Value:

Definition at line 10177 of file LibMkKernel_mk.h.

◆ MkErrorFORMAT_1X

#define MkErrorFORMAT_1X ( x)
Value:

Definition at line 10176 of file LibMkKernel_mk.h.

◆ MkErrorFORMAT_EO_0

#define MkErrorFORMAT_EO_0 ( )
Value:
MK_EXTERN MK_ERR MkErrorFORMAT_EO(MK_OBJN fmtobj)
same as (static,runtime) MK_ERR MkErrorDEFAULT() but do not set the MkERROR.format_of_error attribute...

Definition at line 1260 of file kernel_overload_mk.h.

◆ MkErrorIGNORE

#define MkErrorIGNORE ( )
Value:
MK_ERR MkErrorIGNORE_RT(MK_PARSER_RT_ONLY)
ignore-system-error - ignore the next error …

Definition at line 1262 of file kernel_overload_mk.h.

◆ MkErrorIGNORE_NULL

#define MkErrorIGNORE_NULL ( )
Value:

Definition at line 1261 of file kernel_overload_mk.h.

◆ MkErrorPANIC

#define MkErrorPANIC ( )
Value:
MK_ERR MkErrorPANIC_RT(MK_PARSER_RT_ONLY)
panic-system-error - panic on next error …

Definition at line 1264 of file kernel_overload_mk.h.

◆ MkErrorPANIC_NULL

#define MkErrorPANIC_NULL ( )
Value:

Definition at line 1263 of file kernel_overload_mk.h.

◆ MkErrorPRINT

#define MkErrorPRINT ( )
Value:
MK_ERR MkErrorPRINT_RT(MK_PARSER_RT_ONLY)
ignore-system-error - print the next error into MkLogFileC …

Definition at line 1266 of file kernel_overload_mk.h.

◆ MkErrorPRINT_NULL

#define MkErrorPRINT_NULL ( )
Value:

Definition at line 1265 of file kernel_overload_mk.h.

Function Documentation

◆ MkErrorDEFAULT_RT()

MK_ERR MkErrorDEFAULT_RT ( MK_PARSER_RT_ONLY )
inline

default-system-error - default-error

The default-error is defined once per runtime and is used as only-valid-source of an MkErrorC in a thread or process.

See also
ErrorFORMAT, ErrorPRINT, ErrorIGNORE, MkErrorPANIC

Definition at line 12615 of file LibMkKernel_mk.h.

12615 {
12617 MkERROR.format_of_error = MK_ERROR_DEFAULT;
12618 return &MkERROR;
12619}
#define MkERROR
#define MK_ERROR_DEFAULT
#define MK_CLASS_RT

◆ MkErrorDEFAULTP()

MK_EXTERN MK_ERR MkErrorDEFAULTP ( MK_PARSER_RT_ONLY )

Non-inline replacement for MkErrorDEFAULT

◆ MkErrorFORMAT()

MK_EXTERN MK_ERR MkErrorFORMAT ( MK_OBJN fmtobj)

system-error-format - format and return the default-error

Returns
the MkErrorS::format_of_error or MkErrorS::source_of_error attribute

MkErrorFORMAT - usage

Set the MkErrorS::format_of_error attribute to fmtobj or MK_NULL. The next error-message will be formated as usual and than be raised as error. The default-error will be modified.

The next error-message created with ErrorSetC etc is formatted with MkRuntimeS->cid ("context-in-duty") or simply as "DEFAULT" if cid == NULL.

Parameters
[in]fmtobjmanaged object used to format the log-message (default=MK_NULL → use default-format)
Returns
the default-error with MkErrorS::format_of_error attribute set
See also
ErrorDEFAULT, ErrorPRINT, ErrorIGNORE, MkErrorPANIC

◆ MkErrorFORMAT_EO()

MK_EXTERN MK_ERR MkErrorFORMAT_EO ( MK_OBJN fmtobj)

same as (static,runtime) MK_ERR MkErrorDEFAULT() but do not set the MkERROR.format_of_error attribute on errobj==NULL

◆ MkErrorIGNORE_RT()

MK_ERR MkErrorIGNORE_RT ( MK_PARSER_RT_ONLY )
inline

ignore-system-error - ignore the next error …

The next error will be ignored, no formatting will be performed and the the default-error will not be modified.

MkErrorIGNORE - usage

There are two functions to suppress an error: MkErrorIGNORE and MkErrorNoRaise.

MkErrorIGNORE
Set the MkErrorS::format_of_error attribute to IGNORE. The next error will be ignored, no formatting will be performed and the the default-error will not be modified.
MkErrorNoRaise
Set the MkErrorS::noRaise attribute to TRUE. The next error will be set as usual but not raised. This is usefull to set an error and later append additional information to the error. Final the error have to be raised with MkErrorRaise.
Returns
the default-error with MkErrorS::format_of_error attribute set
See also
ErrorDEFAULT, ErrorPRINT, ErrorIGNORE, MkErrorPANIC

Definition at line 12599 of file LibMkKernel_mk.h.

12599 {
12601 MkERROR.format_of_error = MK_ERROR_IGNORE;
12602 return &MkERROR;
12603}
#define MK_ERROR_IGNORE

◆ MkErrorIGNOREP()

MK_EXTERN MK_ERR MkErrorIGNOREP ( MK_PARSER_RT_ONLY )

Non-inline replacement for MkErrorIGNORE

◆ MkErrorPANIC_RT()

MK_ERR MkErrorPANIC_RT ( MK_PARSER_RT_ONLY )
inline

panic-system-error - panic on next error …

If the panic-system-error is used as the format-obj of an error-message, the text is formated as usual, but the default-error is not set, instead a MkPanicVL is called and the application terminates.

MkErrorPANIC - usage

Set the MkErrorS::format_of_error attribute to PANIC. The next error-message will be formated as usual and than be reported using MkPanicVL. With MkPanicVL the error will be printed to MkLogFileC (default: stderr) and the application will abort.

Returns
the default-error with MkErrorS::format_of_error attribute set
See also
ErrorDEFAULT, ErrorPRINT, ErrorIGNORE, MkErrorPANIC

Definition at line 12591 of file LibMkKernel_mk.h.

12591 {
12593 MkERROR.format_of_error = MK_ERROR_PANIC;
12594 return &MkERROR;
12595}
#define MK_ERROR_PANIC

◆ MkErrorPANICP()

MK_EXTERN MK_ERR MkErrorPANICP ( MK_PARSER_RT_ONLY )

Non-inline replacement for MkErrorPANIC

◆ MkErrorPRINT_RT()

MK_ERR MkErrorPRINT_RT ( MK_PARSER_RT_ONLY )
inline

ignore-system-error - print the next error into MkLogFileC

The next error-message will be formated as usual and than be reported using MkLogVL. The default-error will not be modified.

MkErrorPRINT - usage

Set the MkErrorS::format_of_error attribute to PRINT.

Returns
the default-error with MkErrorS::format_of_error attribute set
See also
ErrorDEFAULT, ErrorPRINT, ErrorIGNORE, MkErrorPANIC

Definition at line 12607 of file LibMkKernel_mk.h.

12607 {
12609 MkERROR.format_of_error = MK_ERROR_PRINT;
12610 return &MkERROR;
12611}
#define MK_ERROR_PRINT

◆ MkErrorPRINTP()

MK_EXTERN MK_ERR MkErrorPRINTP ( MK_PARSER_RT_ONLY )

Non-inline replacement for MkErrorPRINT