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
A JSON serializable replacement for
Throwable
s. 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 an
Exception
directly.- Since:
- 4.0
-
Constructor Summary
ConstructorDescriptionExceptionData
(int errorCode, String errorClass, String message, String stack) Creates an instance for aThrowable
-
Method Summary
-
Constructor Details
-
ExceptionData
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 Details
-
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 originalThrowable
had none- Specified by:
getErrorCode
in interfacecom.inet.error.HasErrorCode
- Returns:
- the error code or -1
- Since:
- 4.0
-
toString
-
getMessage
Returns the message of the root cause- Returns:
- the message of the root cause, may be
null
e.g. for aNullPointerException
- Since:
- 4.0
-
getStack
Returns the stack trace of the root causeThrowable
-
equals
-