18public class
MkExceptionC extends RuntimeException implements AutoCloseable {
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());
41 private static void Raise_MkReferenceNullExceptionC (String cls, Object obj) {
42 throw new MkReferenceNullExceptionC(obj ==
null ? cls : obj.getClass().getName());
native void StackFormat(String callfunc, String callfile, int callline)
Java: err.StackFormat(?String callfunc = null?, ?String callfile = null?, ?int callline = -1?...
native void SetC(String message, String callfunc, int errnum)
Java: err.SetC(String message, ?String callfunc = null?, ?int errnum = -1?) → C-API 'set' and '...