Package com.inet.pdfc.error
Class ExceptionData
- java.lang.Object
-
- com.inet.pdfc.error.ExceptionData
-
- All Implemented Interfaces:
com.inet.error.HasErrorCode
- Direct Known Subclasses:
PresenterExceptionData
@JsonData public class ExceptionData extends java.lang.Object implements com.inet.error.HasErrorCodeA JSON serializable replacement forThrowables. Since i-net PDFC is designed to persist and transmit any part of the result, consider to use this class in events instead of throwing anExceptiondirectly.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description ExceptionData(int errorCode, java.lang.String errorClass, java.lang.String message, java.lang.String stack)Creates an instance for aThrowable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetErrorClass()Returns the full class name of the root causeThrowableintgetErrorCode()Returns the error code or -1 if there originalThrowablehad nonejava.lang.StringgetMessage()Returns the message of the root causejava.lang.StringgetStack()Returns the stack trace of the root causeThrowablejava.lang.StringtoString()
-
-
-
Constructor Detail
-
ExceptionData
public ExceptionData(int errorCode, java.lang.String errorClass, java.lang.String message, java.lang.String stack)Creates an instance for aThrowable- Parameters:
errorCode- the error code if any, hence -1. ErrorCodes are well defined to the application and each plug-in so please don't guess this value. When in doubt, use -1.errorClass- the full qualified class name of the original exception classmessage- the message of the exceptionstack- the stack of the exception- Since:
- 4.0
-
-
Method Detail
-
getErrorClass
public java.lang.String getErrorClass()
Returns the full class name of the root causeThrowable- Returns:
- the full class name of the root cause
Throwable, notnull - Since:
- 4.0
-
getErrorCode
public int getErrorCode()
Returns the error code or -1 if there originalThrowablehad none- Specified by:
getErrorCodein interfacecom.inet.error.HasErrorCode- Returns:
- the error code or -1
- Since:
- 4.0
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getMessage
public java.lang.String getMessage()
Returns the message of the root cause- Returns:
- the message of the root cause, may be
nulle.g. for aNullPointerException - Since:
- 4.0
-
getStack
public java.lang.String getStack()
Returns the stack trace of the root causeThrowable- Returns:
- the stack trace of the root cause
Throwable, may benullif not provided by the root causeThrowable - Since:
- 4.0
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-