Package paypal.payflow
Class ErrorObject
java.lang.Object
paypal.payflow.ErrorObject
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 Summary
ConstructorsModifierConstructorDescriptionprotectedErrorObject(int severity, String msgCode, String msgBody) Used for populating error message from the Message xml file.protectedErrorObject(int severity, String msgCode, String[] msgCodeParams) Used for Validation Errors which don't have a stack trace.protectedErrorObject(int severity, String msgCode, String[] msgCodeParams, String stackTrace) Used for Exception objects, which have a stack trace.protectedErrorObject(int severity, String msgCode, String msgBody, String[] msgCodeParams, String stackTrace) Used for copying the error object in the logger class.protectedErrorObject(String msgBody) Used for Exception objects without any message code and stack trace.protectedErrorObject(String msgBody, String stackTrace) Used for Exception objects without any message code. -
Method Summary
Modifier and TypeMethodDescriptionbooleanreturns true if the passed object is of type ErrorObject and all members are equal to this members.Return the stack trace for the error.protected StringReturn the message body for the error.Return the message Code for the error.Return the message params for the error.intReturn the severity level for the error.toString()This function formats the error message by filling the place holders with the context parameters
-
Constructor Details
-
ErrorObject
Used for Validation Errors which don't have a stack trace.- Parameters:
severity- intmsgCode- StringmsgCodeParams- String[]
-
ErrorObject
Used for populating error message from the Message xml file.- Parameters:
severity- intmsgCode- StringmsgBody- String
-
ErrorObject
Used for Exception objects, which have a stack trace.- Parameters:
severity- intmsgCode- StringmsgCodeParams- StringstackTrace- 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- intmsgCode- StringmsgBody- StringmsgCodeParams- String[]stackTrace- String
-
ErrorObject
Used for Exception objects without any message code.- Parameters:
msgBody- StringstackTrace- String
-
ErrorObject
Used for Exception objects without any message code and stack trace.- Parameters:
msgBody- String
-
-
Method Details
-
getMessageBody
Return the message body for the error.- Returns:
- messageBody String
-
getMessageCode
Return the message Code for the error.- Returns:
- messgeCode 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
Return the message params for the error.- Returns:
- messageParams ArrayList
-
toString
This function formats the error message by filling the place holders with the context parameters -
equals
returns true if the passed object is of type ErrorObject and all members are equal to this members.
-