Class IPMIException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.metricshub.ipmi.core.coding.payload.lan.IPMIException
All Implemented Interfaces:
Serializable

public class IPMIException extends Exception
See Also:
  • Constructor Details

    • IPMIException

      public IPMIException(CompletionCode completionCode)
    • IPMIException

      public IPMIException(CompletionCode completionCode, int rawCode)
      Parameters:
      completionCode - the decoded completion code, CompletionCode.Unknown for a code the library does not list
      rawCode - the completion code byte as the BMC sent it
    • IPMIException

      public IPMIException(CompletionCode completionCode, int rawCode, String description)
      Creates the exception for a code whose meaning depends on the command: an OEM or command-specific code that CompletionCode does not list.
      Parameters:
      completionCode - the decoded completion code, CompletionCode.Unknown for a code the library does not list
      rawCode - the completion code byte as the BMC sent it
      description - the meaning of the code for the command that got it, returned by getMessage(), or null for the generic text
  • Method Details

    • getCompletionCode

      public CompletionCode getCompletionCode()
    • getRawCode

      public int getRawCode()
      Returns:
      the completion code byte as the BMC sent it, meaningful when getCompletionCode() is CompletionCode.Unknown
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • describe

      public String describe()
      Describes the error reply as a sentence without its final period: the message, then the completion code in hexadecimal, named once.
      Returns:
      the description, Requested Sensor, data, or record not present (completion code CBh) or Command-specific completion code 81h for instance
    • describe

      public static String describe(String meaning, int rawCode)
      Describes a completion code as a sentence without its final period: its meaning, then the code in hexadecimal.
      Parameters:
      meaning - the meaning of the code, with or without a final period
      rawCode - the completion code byte
      Returns:
      the description, Invalid session handle (completion code 80h) for instance