Package org.codelibs.fess.exception
Class WebApiException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.codelibs.fess.exception.FessSystemException
org.codelibs.fess.exception.WebApiException
- All Implemented Interfaces:
Serializable
Exception thrown when web API operations encounter errors.
This exception includes an HTTP status code to indicate the nature of the error.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWebApiException(int statusCode, Exception e) Constructs a WebApiException with the specified status code and exception.WebApiException(int statusCode, String message) Constructs a WebApiException with the specified status code and message.WebApiException(int statusCode, String message, Throwable cause) Constructs a WebApiException with the specified status code, message, and cause. -
Method Summary
Modifier and TypeMethodDescriptionintGets the HTTP status code associated with this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
WebApiException
Constructs a WebApiException with the specified status code, message, and cause.- Parameters:
statusCode- The HTTP status codemessage- The detail messagecause- The cause of this exception
-
WebApiException
Constructs a WebApiException with the specified status code and message.- Parameters:
statusCode- The HTTP status codemessage- The detail message
-
WebApiException
Constructs a WebApiException with the specified status code and exception.- Parameters:
statusCode- The HTTP status codee- The exception that caused this WebApiException
-
-
Method Details
-
getStatusCode
public int getStatusCode()Gets the HTTP status code associated with this exception.- Returns:
- The HTTP status code
-