MkErrorC - the class known as err or error is used to create and manage an error message … More...
Topics | |
MkErrorC_Class_JV_API | |
MkErrorC - define the class … | |
MkErrorC_TOR_JV_API | |
MkErrorC - various functions to 'create' and 'delete' a MkErrorS … | |
MkErrorC_System_JV_API | |
MkErrorC - various functions to raise a 'System' messagen on MkErrorS … | |
MkErrorC_Signal_JV_API | |
MkErrorC - various functions to set and check a 'signal' on a MkErrorS … | |
MkErrorC_Get_JV_API | |
MkErrorC - various functions to 'get' data out of a MkErrorS … | |
MkErrorC_Raise_JV_API | |
MkErrorC - various functions to 'raise' a MkErrorS … | |
MkErrorC_Misc_JV_API | |
MkErrorC - various functions to 'work' on a MkErrorS … | |
Classes | |
class | jvmkkernel.MkErrorC |
MkErrorC - the class known as err or error is used to create and manage an error message … More... | |
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 jvmkkernel into the error-handling-code of the target Java.
Example from Filter6.java
→ use MqContextErrorCatch to convert a Java error into a jvmkkernel error
public static void main(String[] argv) { MqContextC srv = MqFactoryC.Add(Filter6.class).New(); try { srv.LinkCreate(argv); srv.ProcessEvent(MqWaitOnEventE.FOREVER); } catch (Throwable e) { srv.ErrorCatch(e); } finally { srv.Exit(); } }
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
var VAL = ReadBUF(); mycl = new Client(); mycl.LinkCreate(ConfigGetStartAs()); int PID = (int) mycl.Send("W", "GPID@I"); int RET=0; SysKill(PID,9); for (int i = 0; i < 3; i++) { try { RET = (int) mycl.Send("W", "ECOI:U@I", VAL); } catch (MkExceptionC ex) { var err = mycl.ErrorCatch(ex); if (err.IsSOCKET()) { err.Reset(); mycl.LinkConnect(); continue; } else { err.Raise(); } } break; } SendSTART(); SendI32(RET);
[in] | exception | the exception object from Java, if null the global exception object is used |