MkErrorC - the class known as err or error is used to create and manage an error message … More...
Topics | |
MkErrExtC | |
MkErrExtS - extend the MkErrorC with a library specific feature … | |
MkErrorPanicC | |
signal-slot for panic on error … | |
MkErrorIgnoreC | |
signal-slot for ignore on error … | |
MkErrorPrintC | |
signal-slot for print on error … | |
MkErrorExitC | |
signal-slot for panic on error … | |
MkErrorDefaultC | |
signal-slot for raise an error … | |
MkErrorC_Class_C_API | |
MkErrorC - define the class … | |
MkErrorC_TOR_C_API | |
MkErrorC - various functions to 'create' and 'delete' a MkErrorS … | |
MkErrorC_System_C_API | |
MkErrorC - various functions to raise a 'System' messagen on MkErrorS … | |
MkErrorC_Signal_C_API | |
MkErrorC - various functions to set and check a 'signal' on a MkErrorS … | |
MkErrorC_Get_C_API | |
MkErrorC - various functions to 'get' data out of a MkErrorS … | |
MkErrorC_Raise_C_API | |
MkErrorC - various functions to 'raise' a MkErrorS … | |
MkErrorC_Misc_C_API | |
MkErrorC - various functions to 'work' on a MkErrorS … | |
Data Structures | |
struct | MkErrorS |
The data-type to store and handle the error-condition … More... | |
Macros | |
#define | MkDbgErr_2(err, col) |
#define | MkDbgErr(err) |
MkErrorC - the class known as err or error is used to create and manage an error message …
An error is a singleton object per thread created at startup and is located at MkRuntimeRLS using the datatype MkErrorC.
As error-indicator the enum MkErrorE is used.
The MkErrorC is used to collect all data needed to handle an error and provide global ressources required to process and report the error.
The MkErrorC is also used to integrate the error-handling from atlmkkernel into the error-handling-code of the target Atl.
Example from Filter6.atl
→ use MqContextErrorCatch to convert a Atl error into a atlmkkernel error
MqMsgque::Main { set srv [MqFactoryC::New [MqFactoryC::Add ::Filter6]] try { MqContextC::LinkCreate $srv {*}$argv MqContextC::ProcessEvent $srv MQ_WAIT_FOREVER } on error {} { MqContextC::ErrorCatch $srv } finally { MqContextC::Exit $srv } }
MkExceptionC - The default-exception of the Programming-Language-Micro-Kernel (PLMK) …
The Programming-Language-Micro-Kernel (PLMK) provide with MkErrorC a complete error-handling with focus to support the "C"
Programming-Language. The support include catch, raise, signal and attributes. In addition every Target-Programming-Language (TPL) add their own error-handling and the purpose of MkExceptionC is to integrate the MkErrorC into the Target-Programming-Language (TPL).
The default-exception MkExceptionC is used to connect the MkErrorC with the Target-Programming-Language (TPL) error-object.
The implementation of an exception depends heavily on the Target-Programming-Language (TPL), starting with no exception at all, for example. C
, an exception as a class object, or as an exception as a global attribute.
Checks if Exception is of type MkExceptionC and returns true
or false
…
Example: test case to check KILL and RECOVER feature, check on MkExceptionC
set VAL [ReadBUF $myNs] set cl [myooX::NewN ::Client] Client::myLinkCreate $cl [ConfigGetStartAs $myNs] Send $cl "W" "GPID@I" PID SysKill $myNs $PID 9 set RET 0 foreach num {1 2 3} { try { set RET [Send $cl "W" "ECOI:U@I" $VAL] } trap {MkExceptionC} "" { set err [ErrorCatch $cl] if {[MkErrorC::IsSOCKET $err]} { MkErrorC::Reset $err LinkConnect $cl continue } else { MkErrorC::Raise $err } myooX::DestroyN $err } break } SendSTART $myNs SendI32 $myNs $RET
true
or false
[in] | exception | the exception object from Atl, if "MK_NULL" the global exception object is used |
#define MkDbgErr | ( | err | ) |
Definition at line 9696 of file LibMkKernel_mk.h.
#define MkDbgErr_2 | ( | err, | |
col ) |
Definition at line 9693 of file LibMkKernel_mk.h.