Class ResultException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- net.webpdf.wsclient.exception.ResultException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AuthResultException,ClientResultException,ServerResultException
public class ResultException extends Exception
An instance of
ResultExceptionwill be encountered in case a wsclient operation failed for some reason.
AResultExceptionmostly serves as the common, generic, catchable base type for more specific exceptions that provide more detailed information about the failure.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedResultException(@NotNull Error wsClientError, @Nullable String errorMessage, int errorCode, @Nullable String stackTraceMessage, @Nullable Exception cause)Constructs a newResultExceptionwith the given information.
Note that the detail message associated withcauseis not automatically incorporated in this exception's detail message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull ErrorgetClientError()Returns the wsclientErrorof thisResultException.intgetErrorCode()Returns the error code of thisResultException.
ForServerResultExceptions this is the actual webPDF server error code, otherResultExceptions shall return the numerical representation of the wsclientError.@Nullable StringgetMessage()Returns the message describing thisResultException.@Nullable StringgetStackTraceMessage()Returns the stacktrace message of thisResultException.
For mostResultExceptions this will returnnull-ServerResultExceptions shall return theStringrepresentation of the stacktrace, that lead to the error on the webPDF server“s side.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ResultException
protected ResultException(@NotNull @NotNull Error wsClientError, @Nullable @Nullable String errorMessage, int errorCode, @Nullable @Nullable String stackTraceMessage, @Nullable @Nullable Exception cause)Constructs a new
ResultExceptionwith the given information.
Note that the detail message associated withcauseis not automatically incorporated in this exception's detail message.- Parameters:
wsClientError- The wsclient specificError.errorCode- The numeric error code.errorMessage- The detail message (which is saved for later retrieval by thegetMessage()method).stackTraceMessage- The (optional) stacktrace message.cause- The cause (which is saved for later retrieval by theThrowable.getCause()method). (Anullvalue is permitted, and indicates that the cause is nonexistent or unknown.)
-
-
Method Detail
-
getClientError
@NotNull public @NotNull Error getClientError()
Returns the wsclientErrorof thisResultException.- Returns:
- The wsclient
Errorof thisResultException.
-
getErrorCode
public int getErrorCode()
Returns the error code of this
ResultException.
ForServerResultExceptions this is the actual webPDF server error code, otherResultExceptions shall return the numerical representation of the wsclientError.
- Returns:
- The error code of this
ResultException.
-
getMessage
@Nullable public @Nullable String getMessage()
Returns the message describing thisResultException.- Overrides:
getMessagein classThrowable- Returns:
- The message describing this
ResultException.
-
getStackTraceMessage
@Nullable public @Nullable String getStackTraceMessage()
Returns the stacktrace message of this
ResultException.
For mostResultExceptions this will returnnull-ServerResultExceptions shall return theStringrepresentation of the stacktrace, that lead to the error on the webPDF server“s side.- Returns:
- The stacktrace message of this
ResultException.
-
-