Class ClientResultException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- net.webpdf.wsclient.exception.ResultException
-
- net.webpdf.wsclient.exception.ClientResultException
-
- All Implemented Interfaces:
Serializable
public class ClientResultException extends ResultException
An instance of
ClientResultExceptionwill be encountered in case a wsclient operation failed on the client´s side. It shall describe the failure, by providing aErrorand a message describing the issue.Important: A
ClientResultExceptionis describing failures in an application implementing a wsclient and should never be used to indicate fail states on the side of the webPDF server.
ServerResultExceptionshall be reserved for that purpose.- See Also:
Error, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClientResultException(@NotNull Error error)Creates a newResultExceptionwrapping the given wsclientErrorfail state.ClientResultException(@NotNull Error error, @Nullable Exception cause)Creates a newResultExceptionwrapping the given wsclientErrorfail state, exit code andExceptioncause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull ResultExceptionappendMessage(@Nullable String message)Appends the given text to the end of the message describing thisResultException.@Nullable StringgetMessage()Returns the detail message string of this throwable.StringtoString()Returns aStringrepresentation of thisClientResultException.-
Methods inherited from class net.webpdf.wsclient.exception.ResultException
getClientError, getErrorCode, getStackTraceMessage
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
ClientResultException
public ClientResultException(@NotNull @NotNull Error error)Creates a newResultExceptionwrapping the given wsclientErrorfail state.- Parameters:
error- The wsclientErrorfail state to wrap.
-
ClientResultException
public ClientResultException(@NotNull @NotNull Error error, @Nullable @Nullable Exception cause)Creates a new
ResultExceptionwrapping the given wsclientErrorfail state, exit code andExceptioncause.Important: A
ClientResultExceptionis describing failures in an application implementing a wsclient and should never be used to indicate fail states on the side of the webPDF server.
ServerResultExceptionshall be reserved for that purpose.
-
-
Method Detail
-
getMessage
@Nullable public @Nullable String getMessage()
Returns the detail message string of this throwable.- Overrides:
getMessagein classResultException- Returns:
- the detail message string of this
Throwableinstance (which may benull).
-
appendMessage
@NotNull public @NotNull ResultException appendMessage(@Nullable @Nullable String message)
Appends the given text to the end of the message describing thisResultException.- Parameters:
message- The text to append to the end of the message describing thisResultException.- Returns:
- The
ResultExceptioninstance itself.
-
toString
public String toString()
Returns aStringrepresentation of thisClientResultException.- Overrides:
toStringin classThrowable- Returns:
- A
Stringrepresentation of thisClientResultException.
-
-