Package net.solarnetwork.io
Class ResultStatusException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.solarnetwork.io.ResultStatusException
- All Implemented Interfaces:
Serializable
Exception thrown when an error or unexpected result status is returned from
an IO operation.
This exception can be used to report conditions like non-200 level HTTP status codes.
- Since:
- 1.54
- Version:
- 1.0
- Author:
- matt
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionResultStatusException(int statusCode, String message) Constructor.ResultStatusException(int statusCode, String message, Throwable cause) Constructor.ResultStatusException(URL url, int statusCode, String message) Constructor.ResultStatusException(URL url, int statusCode, String message, Throwable cause) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintGet the result status code.getUrl()Get the source URL, if available.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ResultStatusException
Constructor.- Parameters:
statusCode- the status codemessage- the message
-
ResultStatusException
Constructor.- Parameters:
url- the URLstatusCode- the status codemessage- the message
-
ResultStatusException
Constructor.- Parameters:
statusCode- the status codemessage- the messagecause- the cause
-
ResultStatusException
Constructor.- Parameters:
url- the URLstatusCode- the status codemessage- the messagecause- the cause
-
-
Method Details
-
getUrl
Get the source URL, if available.- Returns:
- the url the URL, or null
-
getStatusCode
public int getStatusCode()Get the result status code.- Returns:
- the status code
-