Class ErrorObject

java.lang.Object
paypal.payflow.ErrorObject

public final class ErrorObject extends Object
This class contains the error message along with the message code, severity level of the error and the stack trace. This class represents the format of an error message.
  • Constructor Details

    • ErrorObject

      protected ErrorObject(int severity, String msgCode, String[] msgCodeParams)
      Used for Validation Errors which don't have a stack trace.
      Parameters:
      severity - int
      msgCode - String
      msgCodeParams - String[]
    • ErrorObject

      protected ErrorObject(int severity, String msgCode, String msgBody)
      Used for populating error message from the Message xml file.
      Parameters:
      severity - int
      msgCode - String
      msgBody - String
    • ErrorObject

      protected ErrorObject(int severity, String msgCode, String[] msgCodeParams, String stackTrace)
      Used for Exception objects, which have a stack trace.
      Parameters:
      severity - int
      msgCode - String
      msgCodeParams - String
      stackTrace - String
    • ErrorObject

      protected ErrorObject(int severity, String msgCode, String msgBody, String[] msgCodeParams, String stackTrace)
      Used for copying the error object in the logger class.
      Parameters:
      severity - int
      msgCode - String
      msgBody - String
      msgCodeParams - String[]
      stackTrace - String
    • ErrorObject

      protected ErrorObject(String msgBody, String stackTrace)
      Used for Exception objects without any message code.
      Parameters:
      msgBody - String
      stackTrace - String
    • ErrorObject

      protected ErrorObject(String msgBody)
      Used for Exception objects without any message code and stack trace.
      Parameters:
      msgBody - String
  • Method Details

    • getMessageBody

      protected String getMessageBody()
      Return the message body for the error.
      Returns:
      messageBody String
    • getMessageCode

      public String getMessageCode()
      Return the message Code for the error.
      Returns:
      messgeCode String
    • getErrorStackTrace

      public String getErrorStackTrace()
      Return the stack trace for the error.
      Returns:
      stackTrace String
    • getSeverityLevel

      public int getSeverityLevel()
      Return the severity level for the error.
      Returns:
      severityLevel int
    • getMessageParams

      public ArrayList getMessageParams()
      Return the message params for the error.
      Returns:
      messageParams ArrayList
    • toString

      public String toString()
      This function formats the error message by filling the place holders with the context parameters
      Overrides:
      toString in class Object
      Returns:
      formattedMessage String
    • equals

      public boolean equals(Object obj)
      returns true if the passed object is of type ErrorObject and all members are equal to this members.
      Overrides:
      equals in class Object
      Parameters:
      obj - Object
      Returns:
      isEqual boolean