Class JJournalException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.metabit.platform.interfacing.jjournal.JJournalException
- All Implemented Interfaces:
Serializable
(unchecked) Exception class for JJournal
- Version:
- $Id: $Id
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumerror codes to differentiate by, e.g. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JJournalException.ErrorCodesJDK-8275192private final intJDK-8275192 -
Constructor Summary
ConstructorsConstructorDescriptionJJournalException(int returncode) public constructor taking a systemd-journal C API return-codeJJournalException(JJournalException.ErrorCodes errorcode) public constructor for known events -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
returncode
private final int returncodeJDK-8275192 -
errorcode
JDK-8275192
-
-
Constructor Details
-
JJournalException
public JJournalException(int returncode) public constructor taking a systemd-journal C API return-code- Parameters:
returncode- the negative int value returned by the C API on errors. supposed to be resolvable by std::strerror, but not always clear in meaning.
-
JJournalException
public constructor for known events- Parameters:
errorcode- code telling us what's the issue, roughly.
-
-
Method Details
-
getCode
get the errorcode for further differentiation. may be NUMERICAL_CODE with further processing required-- Returns:
- enum value from ErrorCodes
-
getNumericalErrorCode
public int getNumericalErrorCode()get the numerical sub-errorcode when the errorcode NUMERICAL_CODE is given.- Returns:
- numerical value that may be mapped using strerror().
-
toString
-