theKernel 10.0
|
MkErrorC - the class known as err or error is used to create and manage an error message … More...
Public Member Functions | |
native MkErrorC | Next () |
Java: → C-API get next instance from linked-list of MkErrorS type | |
native MkErrorC | Prev () |
Java: → C-API get previous instance from linked-list of MkErrorS type | |
native MkErrorE | GetCode () |
Java: → C-API get the value of MkErrorS::code … | |
native int | GetNum () |
Java: → C-API get the MkErrorS::num. The number can be used as exit-code … | |
native long | GetSize () |
Java: → C-API get the error-message-size from the exception-object … | |
native String | GetText () |
Java: → C-API get the MkErrorS::text … | |
native MkErrorC | Catch (Throwable exception, String callfunc) |
Java: → C-API convert a programming-language-error into an jvmkkernel error … | |
MkErrorC | Catch () |
Java: → C-API convert a programming-language-error into an jvmkkernel error … | |
MkErrorC | Catch (Throwable exception) |
Java: → C-API convert a programming-language-error into an jvmkkernel error … | |
native void | Cleanup (String callfunc, int callline) |
Java: → C-API cleanup and print unwanted active error … | |
void | Cleanup () |
Java: → C-API cleanup and print unwanted active error … | |
void | Cleanup (String callfunc) |
Java: → C-API cleanup and print unwanted active error … | |
void | Log () |
Java: → C-API log the error to MkLogFileC (default: stderr) … | |
void | Log (MkObjectC fmtobj) |
Java: → C-API log the error to MkLogFileC (default: stderr) … | |
void | Log (MkObjectC fmtobj, int debug) |
Java: → C-API log the error to MkLogFileC (default: stderr) … | |
void | Log (MkObjectC fmtobj, int debug, String callfunc) |
Java: → C-API log the error to MkLogFileC (default: stderr) … | |
native void | Println (String msg, String callfunc, int callline) |
Java: → C-API print the default-error to the MkLogFileC (default: stderr) and clear the error afterwards … | |
void | Println () |
Java: → C-API print the default-error to the MkLogFileC (default: stderr) and clear the error afterwards … | |
void | Println (String msg) |
Java: → C-API print the default-error to the MkLogFileC (default: stderr) and clear the error afterwards … | |
void | Println (String msg, String callfunc) |
Java: → C-API print the default-error to the MkLogFileC (default: stderr) and clear the error afterwards … | |
native void | Reset (String callfunc, int callline, boolean force) |
Java: → C-API This function clears the err and resets to MK_OK … | |
void | Reset () |
Java: → C-API This function clears the err and resets to MK_OK … | |
void | Reset (String callfunc) |
Java: → C-API This function clears the err and resets to MK_OK … | |
void | Reset (String callfunc, int callline) |
Java: → C-API This function clears the err and resets to MK_OK … | |
native MkErrorE | Stack (String callfunc, String callfile, int callline) |
Java: → C-API check on error and if yes append an ErrorStackFormat to the error-message … | |
native void | StackFormat (String callfunc, String callfile, int callline) |
Java: → C-API append an ensemble of func, file and line to the error-message … | |
void | StackFormat () |
Java: → C-API append an ensemble of func, file and line to the error-message … | |
void | StackFormat (String callfunc) |
Java: → C-API append an ensemble of func, file and line to the error-message … | |
void | StackFormat (String callfunc, String callfile) |
Java: → C-API append an ensemble of func, file and line to the error-message … | |
MkErrorE | Stack () |
Java: → C-API check on error and if yes append an ErrorStackFormat to the error-message … | |
MkErrorE | Stack (String callfunc) |
Java: → C-API check on error and if yes append an ErrorStackFormat to the error-message … | |
MkErrorE | Stack (String callfunc, String callfile) |
Java: → C-API check on error and if yes append an ErrorStackFormat to the error-message … | |
native MkErrorC | NoRaise () |
Java: → C-API ignore the next return of MK_ERROR and do not raise an target-language-exception … | |
native void | AppendC (String message) |
Java: → C-API append the message to the MkErrorS::text … | |
native void | Raise () |
Java: → C-API convert an jvmkkernel error into an programming-language-error and raise afterwards. … | |
native void | SetC (String message, String callfunc, int errnum) |
Java: → C-API 'set' and 'raise' the MkErrorC using a string-message and a errnum-number … | |
void | SetC (String message) |
Java: → C-API 'set' and 'raise' the MkErrorC using a string-message and a errnum-number … | |
void | SetC (String message, String callfunc) |
Java: → C-API 'set' and 'raise' the MkErrorC using a string-message and a errnum-number … | |
native boolean | IsABORT () |
Java: → C-API check on ABORT signal … | |
native boolean | IsEXIT () |
Java: → C-API check on APPLICATION-EXIT error … | |
native boolean | IsSOCKET () |
Java: → C-API check on SOCKET-DOWN error … | |
native boolean | IsTIMEOUT () |
Java: → C-API check on TIMEOUT error … | |
native void | SetABORT (String detail, String callfunc) |
Java: → C-API send the ABORT signal to the calling stack… | |
void | SetABORT () |
Java: → C-API send the ABORT signal to the calling stack… | |
void | SetABORT (String detail) |
Java: → C-API send the ABORT signal to the calling stack… | |
native void | SetCONTINUE () |
Java: → C-API signal end of processing in an MqMqEventIF callback … | |
native void | SetCode (MkErrorE code) |
Java: → C-API set the MkErrorS::code value … | |
native void | SetEXIT (String callfunc) |
Java: → C-API finish the current callback, return to toplevel and MqExit the application … | |
void | SetEXIT () |
Java: → C-API finish the current callback, return to toplevel and MqExit the application … | |
native void | SetSOCKET (String detail, String callfunc) |
Java: → C-API create SOCKET-DOWN error … | |
void | SetSOCKET () |
Java: → C-API create SOCKET-DOWN error … | |
void | SetSOCKET (String detail) |
Java: → C-API create SOCKET-DOWN error … | |
native MkErrorC | Dup () |
Java: → C-API Dup-Constructor - create a new MkErrorC instance as copy from an existing MkErrorC instance … | |
native void | Copy (MkErrorC srce) |
Java: → C-API Copy-Constructor - sync an existing MkErrorC instance with the values from an existing MkErrorC instance … | |
![]() | |
void | close () |
String | toString () |
native void | HandleDelete () |
Java: → C-API Handle-Delete-Slot - delete a netObj from handle-storage … | |
native boolean | HandleExists () |
Java: → C-API check if obj has already a handle defined… | |
native int | HandleGet () |
Java: → C-API Handle-Get-Slot - returns a export-hdl to the MkObjectC useable for external storage | |
native int | HandleGetOfType () |
Java: → C-API Export-Slot - returns typeHdl of the obj . | |
native int | HandleGetOr0 () |
Java: → C-API return export-hdl or 0 in not created… | |
native void | DbgDump (String message, String callfunc) |
Java: → C-API debug: Dump a instance to stderr with LNG and MQ internal data… | |
void | DbgDump () |
Java: → C-API debug: Dump a instance to stderr with LNG and MQ internal data… | |
void | DbgDump (String message) |
Java: → C-API debug: Dump a instance to stderr with LNG and MQ internal data… | |
native void | DbgL (String message, int debug, String callfunc, int lvl) |
Java: → C-API debug: write a instance-marker to the MkLogFileC (default: stderr) using the fmtobj as prefix … | |
void | DbgL (String message) |
Java: → C-API debug: write a instance-marker to the MkLogFileC (default: stderr) using the fmtobj as prefix … | |
void | DbgL (String message, int debug) |
Java: → C-API debug: write a instance-marker to the MkLogFileC (default: stderr) using the fmtobj as prefix … | |
void | DbgL (String message, int debug, String callfunc) |
Java: → C-API debug: write a instance-marker to the MkLogFileC (default: stderr) using the fmtobj as prefix … | |
native void | DbgLogC (String callfunc) |
Java: → C-API debug: write a short-obj-summary to MkLogFileC (default: stderr) … | |
void | DbgLogC () |
Java: → C-API debug: write a short-obj-summary to MkLogFileC (default: stderr) … | |
native void | DbgO (String callfunc) |
Java: → C-API debug: write the object-details to MkLogFileC (default: stderr) … | |
void | DbgO () |
Java: → C-API debug: write the object-details to MkLogFileC (default: stderr) … | |
native void | DbgSTACK (int skip, int num, String callfunc) |
Java: → C-API debug: write the stack-trace to MkLogFileC (default: stderr) … | |
void | DbgSTACK () |
Java: → C-API debug: write the stack-trace to MkLogFileC (default: stderr) … | |
void | DbgSTACK (int skip) |
Java: → C-API debug: write the stack-trace to MkLogFileC (default: stderr) … | |
void | DbgSTACK (int skip, int num) |
Java: → C-API debug: write the stack-trace to MkLogFileC (default: stderr) … | |
native void | LogC (String message, int debug, String callfunc) |
Java: → C-API write a logging-message to MkLogFileC (default: stderr) using the internal format … | |
void | LogC (String message) |
Java: → C-API write a logging-message to MkLogFileC (default: stderr) using the internal format … | |
void | LogC (String message, int debug) |
Java: → C-API write a logging-message to MkLogFileC (default: stderr) using the internal format … | |
native void | LogHEX (String callfunc, byte[] data) |
Java: → C-API log binaray data as HEX into the MkLogFileC (default: stderr) … | |
native void | Log (MkObjectC fmtobj, int debug, String callfunc, int lvl) |
Java: → C-API Log-Slot - log a summary of an object to the MkLogFileC (default: stderr) target … | |
native void | LogLong (MkObjectC fmtobj, int debug, String callfunc, int lvl) |
Java: → C-API log the MkObjectS verbose into the MkLogFileC (default: stderr) … | |
void | LogLong () |
Java: → C-API log the MkObjectS verbose into the MkLogFileC (default: stderr) … | |
void | LogLong (MkObjectC fmtobj) |
Java: → C-API log the MkObjectS verbose into the MkLogFileC (default: stderr) … | |
void | LogLong (MkObjectC fmtobj, int debug) |
Java: → C-API log the MkObjectS verbose into the MkLogFileC (default: stderr) … | |
void | LogLong (MkObjectC fmtobj, int debug, String callfunc) |
Java: → C-API log the MkObjectS verbose into the MkLogFileC (default: stderr) … | |
native void | LogShort (MkObjectC fmtobj, int debug, String callfunc, int lvl) |
Java: → C-API log the MkObjectS into the MkLogFileC (default: stderr) … | |
void | LogShort () |
Java: → C-API log the MkObjectS into the MkLogFileC (default: stderr) … | |
void | LogShort (MkObjectC fmtobj) |
Java: → C-API log the MkObjectS into the MkLogFileC (default: stderr) … | |
void | LogShort (MkObjectC fmtobj, int debug) |
Java: → C-API log the MkObjectS into the MkLogFileC (default: stderr) … | |
void | LogShort (MkObjectC fmtobj, int debug, String callfunc) |
Java: → C-API log the MkObjectS into the MkLogFileC (default: stderr) … | |
native void | LogType (MkObjectC fmtobj, int debug, String callfunc, int lvl) |
Java: → C-API log the tyoe of the MkObjectS into the MkLogFileC (default: stderr) … | |
void | LogType () |
Java: → C-API log the tyoe of the MkObjectS into the MkLogFileC (default: stderr) … | |
void | LogType (MkObjectC fmtobj) |
Java: → C-API log the tyoe of the MkObjectS into the MkLogFileC (default: stderr) … | |
void | LogType (MkObjectC fmtobj, int debug) |
Java: → C-API log the tyoe of the MkObjectS into the MkLogFileC (default: stderr) … | |
void | LogType (MkObjectC fmtobj, int debug, String callfunc) |
Java: → C-API log the tyoe of the MkObjectS into the MkLogFileC (default: stderr) … | |
native MkErrorC | ErrorCatch (Throwable exception, String callfunc) |
Java: → C-API convert a programming-language-error into an jvmkkernel error … | |
MkErrorC | ErrorCatch () |
Java: → C-API convert a programming-language-error into an jvmkkernel error … | |
MkErrorC | ErrorCatch (Throwable exception) |
Java: → C-API convert a programming-language-error into an jvmkkernel error … | |
native MkErrorC | ToError () |
Java: → C-API Error-Slot - return an error-object pre initialized with obj data. | |
native boolean | IsNull () |
Java: → C-API ckeck if the object is null | |
native String | ToName () |
Java: → C-API Info-Slot - returns brief information about the obj as a string | |
native String | ToNameOfClass () |
Java: → C-API Class-Slot - returns the Java-Class-Name of the obj as string | |
native String | ToNameOfType () |
Java: → C-API Type-Slot - returns the LibMkKernel-Type-Name of the obj as a string | |
native String | ToString () |
Java: → C-API String-Slot - returns the string representation of the inst … | |
native int | RefGet () |
MkRefGet | |
native void | SysKill (int pid, int signal) |
MkSysKill | |
native int | SysGetPid () |
MkSysGetPid | |
native void | Dispose () |
Java: → C-API Dispose-Slot - untie the connection between the Native-Java-Instance and the jvmkkernel-Instance. | |
native void | Delete () |
Java: → C-API Delete-Slot - delete an instance. | |
void | printP () |
void | L0 () |
void | L1 () |
void | L2 () |
void | L3 () |
void | L4 () |
void | L5 () |
void | L6 () |
void | L7 () |
void | L8 () |
void | L9 () |
void | LA () |
void | LB () |
void | LE () |
void | printL (String name, Object val) |
Static Public Member Functions | |
static native MkErrorC | HandleResolve (int netHdl) |
Java: → C-API Handle-Resolve-Slot - return a MkErrorC from netHdl or null if invalid… | |
static native MkErrorC | Instances () |
Java: → C-API get head-instance from linked-list of MkErrorS type … | |
static native MkErrorC | GetNull () |
Java: → C-API Null-Slot - return a MkErrorC typed NULL instance … | |
static native void | PanicC (MkObjectC fmtobj, String callfunc, int errnum, String message) |
Java: → C-API do a panic with string as argument … | |
static native void | PanicDEFAULT (MkObjectC fmtobj, String callfunc) |
Java: → C-API make panic from MkErrorDEFAULT_RT … | |
static void | PanicDEFAULT () |
Java: → C-API make panic from MkErrorDEFAULT_RT … | |
static void | PanicDEFAULT (MkObjectC fmtobj) |
Java: → C-API make panic from MkErrorDEFAULT_RT … | |
static native MkErrorC | DEFAULT () |
Java: → C-API default-system-error - default-error … | |
static native MkErrorC | FORMAT (MkObjectC fmtobj) |
Java: → C-API system-error-format - format and return the default-error … | |
static MkErrorC | FORMAT () |
Java: → C-API system-error-format - format and return the default-error … | |
static native MkErrorC | IGNORE () |
Java: → C-API ignore-system-error - ignore the next error … | |
static native MkErrorC | PRINT () |
Java: → C-API ignore-system-error - print the next error into MkLogFileC … | |
![]() | |
static native void | HandleDeleteByNetHdl (int netHdl) |
Java: → C-API Handle-Delete-Slot - delete a netHdl from handle-storage … | |
static native void | DbgM (String message, int debug, String callfunc, int lvl) |
Java: → C-API debug: write a static-marker to the MkLogFileC (default: stderr) … | |
static void | DbgM (String message) |
Java: → C-API debug: write a static-marker to the MkLogFileC (default: stderr) … | |
static void | DbgM (String message, int debug) |
Java: → C-API debug: write a static-marker to the MkLogFileC (default: stderr) … | |
static void | DbgM (String message, int debug, String callfunc) |
Java: → C-API debug: write a static-marker to the MkLogFileC (default: stderr) … | |
static native int | SysHashI32 (String key, int length) |
MkSysHashI32 | |
static int | SysHashI32 (String key) |
MkSysHashI32 | |
static native String | SysHashSTR (String key, int length) |
MkSysHashSTR | |
static String | SysHashSTR (String key) |
MkSysHashSTR | |
static native void | DeleteCallbackCleanup (String ident) |
Java: → C-API cleanup the DeleteCallback installed with MkObjectDeleteCallbackSetup … | |
static native void | DeleteCallbackSetup (String ident, MkObjectDeleteIF callback, String filter) |
Java: → C-API Create/Delete the instance-delete-callback … | |
static void | DeleteCallbackSetup (String ident) |
Java: → C-API Create/Delete the instance-delete-callback … | |
static void | DeleteCallbackSetup (String ident, MkObjectDeleteIF callback) |
Java: → C-API Create/Delete the instance-delete-callback … | |
static int | getPId () |
static long | getTId () |
static String | getCallerProc (int level) |
static String | getCallerProc () |
static String | getStackTrace (int level) |
static String | getStackTrace () |
static int | getCallerLine (int level) |
static int | getCallerLine () |
static String | getCallerFile (int level) |
static String | getCallerFile () |
static void | SF (String msg, String name, int framelvl) |
static void | SF (String msg) |
static void | SF (String msg, String name) |
static void | printP (long ptr, String name, int framelvl) |
static void | printO (byte byt, String name, int framelvl) |
static void | printBool (boolean bol, String name, int framelvl) |
static void | printObj (Object id, String caller, int framelvl) |
static void | printObj (Object id, String caller) |
static void | printObj (Object id) |
static void | printC (String id, String name, int framelvl) |
static void | printC (String id) |
static void | printTyp (MkObjectC id, String name, int framelvl) |
static void | printStack (String name, int framelvl) |
static void | M0 () |
static void | M1 () |
static void | M2 () |
static void | M3 () |
static void | M4 () |
static void | M5 () |
static void | M6 () |
static void | M7 () |
static void | M8 () |
static void | M9 () |
static void | MA () |
static void | MB () |
static void | MC () |
static void | MD () |
static void | ME () |
Additional Inherited Members | |
![]() | |
MkObjectC (long mng, boolean dummy) | |
This contructor is used internal to create an java-object for an already existing libmqmsgque-object. | |
void | Dispose (boolean disposing) |
![]() |
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 |
Definition at line 18 of file MkErrorC.java.