@Test public void checkErrorSuccess() { checkError(ErrorCode.SUCCESS.getId()); }
static void checkError(int errorCode) throws MenohException { if (errorCode != ErrorCode.SUCCESS.getId()) { final String errorMessage = MenohNative.INSTANCE.menoh_get_last_error_message(); ErrorCode ec; try { ec = ErrorCode.valueOf(errorCode); } catch (MenohException e) { throw new MenohException(ErrorCode.UNDEFINED, String.format("%s (%d)", errorMessage, errorCode), e); } final String errorCodeName = ec.toString().toLowerCase(Locale.ENGLISH); throw new MenohException(ec, String.format("%s (%s)", errorMessage, errorCodeName)); } }
MenohException extends RuntimeException { static void checkError(int errorCode) throws MenohException { if (errorCode != ErrorCode.SUCCESS.getId()) { final String errorMessage = MenohNative.INSTANCE.menoh_get_last_error_message(); ErrorCode ec; try { ec = ErrorCode.valueOf(errorCode); } catch (MenohException e) { throw new MenohException(ErrorCode.UNDEFINED, String.format("%s (%d)", errorMessage, errorCode), e); } final String errorCodeName = ec.toString().toLowerCase(Locale.ENGLISH); throw new MenohException(ec, String.format("%s (%s)", errorMessage, errorCodeName)); } } }
MenohException extends RuntimeException { static void checkError(int errorCode) throws MenohException { if (errorCode != ErrorCode.SUCCESS.getId()) { final String errorMessage = MenohNative.INSTANCE.menoh_get_last_error_message(); ErrorCode ec; try { ec = ErrorCode.valueOf(errorCode); } catch (MenohException e) { throw new MenohException(ErrorCode.UNDEFINED, String.format("%s (%d)", errorMessage, errorCode), e); } final String errorCodeName = ec.toString().toLowerCase(Locale.ENGLISH); throw new MenohException(ec, String.format("%s (%s)", errorMessage, errorCodeName)); } } MenohException(ErrorCode errorCode, String message);  MenohException(ErrorCode errorCode, String message, Throwable cause);  MenohException(ErrorCode errorCode, Throwable cause); protected  MenohException(
            ErrorCode errorCode,
            String message,
            Throwable cause,
            boolean enableSuppression,
            boolean writableStackTrace); }
MenohException extends RuntimeException { static void checkError(int errorCode) throws MenohException { if (errorCode != ErrorCode.SUCCESS.getId()) { final String errorMessage = MenohNative.INSTANCE.menoh_get_last_error_message(); ErrorCode ec; try { ec = ErrorCode.valueOf(errorCode); } catch (MenohException e) { throw new MenohException(ErrorCode.UNDEFINED, String.format("%s (%d)", errorMessage, errorCode), e); } final String errorCodeName = ec.toString().toLowerCase(Locale.ENGLISH); throw new MenohException(ec, String.format("%s (%s)", errorMessage, errorCodeName)); } } MenohException(ErrorCode errorCode, String message);  MenohException(ErrorCode errorCode, String message, Throwable cause);  MenohException(ErrorCode errorCode, Throwable cause); protected  MenohException(
            ErrorCode errorCode,
            String message,
            Throwable cause,
            boolean enableSuppression,
            boolean writableStackTrace); ErrorCode getErrorCode(); }
MenohException extends RuntimeException { static void checkError(int errorCode) throws MenohException { if (errorCode != ErrorCode.SUCCESS.getId()) { final String errorMessage = MenohNative.INSTANCE.menoh_get_last_error_message(); ErrorCode ec; try { ec = ErrorCode.valueOf(errorCode); } catch (MenohException e) { throw new MenohException(ErrorCode.UNDEFINED, String.format("%s (%d)", errorMessage, errorCode), e); } final String errorCodeName = ec.toString().toLowerCase(Locale.ENGLISH); throw new MenohException(ec, String.format("%s (%s)", errorMessage, errorCodeName)); } } MenohException(ErrorCode errorCode, String message);  MenohException(ErrorCode errorCode, String message, Throwable cause);  MenohException(ErrorCode errorCode, Throwable cause); protected  MenohException(
            ErrorCode errorCode,
            String message,
            Throwable cause,
            boolean enableSuppression,
            boolean writableStackTrace); ErrorCode getErrorCode();  }