@JsonData
public class ExceptionData
extends java.lang.Object
implements com.inet.error.HasErrorCode
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.Constructor and Description |
---|
ExceptionData(int errorCode,
java.lang.String errorClass,
java.lang.String message,
java.lang.String stack)
Creates an instance for a
Throwable |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getErrorClass()
Returns the full class name of the root cause
Throwable |
int |
getErrorCode()
Returns the error code or -1 if there original
Throwable had none |
java.lang.String |
getMessage()
Returns the message of the root cause
|
java.lang.String |
getStack()
Returns the stack trace of the root cause
Throwable |
public ExceptionData(int errorCode, java.lang.String errorClass, java.lang.String message, java.lang.String stack)
Throwable
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 exceptionpublic java.lang.String getErrorClass()
Throwable
Throwable
, not null
public int getErrorCode()
Throwable
had nonepublic java.lang.String getMessage()
null
e.g. for a NullPointerException
public java.lang.String getStack()
Throwable
Throwable
, may be null
if not provided by the
root cause Throwable
Copyright © 2010-2022 by i-net software GmbH