Class JJournalException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.metabit.platform.interfacing.jjournal.JJournalException
All Implemented Interfaces:
Serializable

public class JJournalException extends RuntimeException
(unchecked) Exception class for JJournal
Version:
$Id: $Id
See Also:
  • Field Details

  • 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 JJournalException(JJournalException.ErrorCodes errorcode)
      public constructor for known events
      Parameters:
      errorcode - code telling us what's the issue, roughly.
  • Method Details

    • getCode

      public JJournalException.ErrorCodes 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

      public String toString()
      Overrides:
      toString in class Throwable