theKernel 10.0
Loading...
Searching...
No Matches
MkExceptionC.java
Go to the documentation of this file.
1
9/* LABEL-NO */
10package jvmkkernel;
11
15
17@SuppressWarnings("serial")
18public class MkExceptionC extends RuntimeException implements AutoCloseable {
19 long hdl = 0L;
20
21 private MkExceptionC (long mng, String msg) {
22 super (msg);
23 hdl = mng;
24 }
25
26 native public void Dispose ();
27
28 public void close () {
29 Dispose();
30 }
31
32 private static void Catch (MkErrorC err, Throwable ex, String callfunc, String stop) {
33 err.NoRaise().SetC(ex.getClass().getName() + ": " + ex.getMessage(),callfunc,-1);
34 for (StackTraceElement elm : ex.getStackTrace()) {
35 var meth = elm.getMethodName();
36 if (stop != null && meth.equals(stop)) break;
37 err.StackFormat(elm.getClassName() + "." + meth, elm.getFileName(), elm.getLineNumber());
38 }
39 }
40
41 private static void Raise_MkReferenceNullExceptionC (String cls, Object obj) {
42 throw new MkReferenceNullExceptionC(obj == null ? cls : obj.getClass().getName());
43 }
44}
45
47
MkErrorC - the class known as err or error is used to create and manage an error message …
Definition MkErrorC.java:18
native void Dispose()
native void StackFormat(String callfunc, String callfile, int callline)
Java: err.StackFormat(?String callfunc = null?, ?String callfile = null?, ?int callline = -1?...
native MkErrorC NoRaise()
Java: MkErrorC err.NoRaise() → C-API ignore the next return of MK_ERROR and do not raise an tar...
native void SetC(String message, String callfunc, int errnum)
Java: err.SetC(String message, ?String callfunc = null?, ?int errnum = -1?) → C-API 'set' and '...