Class ODataRuntimeApplicationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.olingo.odata2.api.exception.ODataRuntimeApplicationException
- All Implemented Interfaces:
Serializable
This class represents a translated application runtime exception. Use this exception class to display custom
exception
messages.
If a HTTP status is given this exception will result in the set status code like an HTTP exception.
A set status code can be used to show a substatus to a HTTP status as described in the OData protocol specification.
If a HTTP status is given this exception will result in the set status code like an HTTP exception.
A set status code can be used to show a substatus to a HTTP status as described in the OData protocol specification.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionODataRuntimeApplicationException(String message, Locale locale) Since this is a translated application exception locale must not be null.ODataRuntimeApplicationException(String message, Locale locale, String errorCode, Throwable e) Since this is a translated application exception locale must not be null.ODataRuntimeApplicationException(String message, Locale locale, Throwable e) Since this is a translated application exception locale must not be null.ODataRuntimeApplicationException(String message, Locale locale, HttpStatusCodes status) Since this is a translated application exception locale must not be null.ODataRuntimeApplicationException(String message, Locale locale, HttpStatusCodes status, String errorCode) Since this is a translated application exception locale must not be null.ODataRuntimeApplicationException(String message, Locale locale, HttpStatusCodes status, String errorCode, Throwable e) Since this is a translated application exception locale must not be null.ODataRuntimeApplicationException(String message, Locale locale, HttpStatusCodes status, Throwable e) Since this is a translated application exception locale must not be null. -
Method Summary
Modifier and TypeMethodDescriptiongetCode()Default code is nullDefault HttpStatusCodes.INTERNAL_SERVER_ERRORMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ODataRuntimeApplicationException
Since this is a translated application exception locale must not be null.- Parameters:
message-locale-
-
ODataRuntimeApplicationException
Since this is a translated application exception locale must not be null.
The status code given will be displayed at the client.- Parameters:
message-locale-status-
-
ODataRuntimeApplicationException
public ODataRuntimeApplicationException(String message, Locale locale, HttpStatusCodes status, String errorCode) Since this is a translated application exception locale must not be null.
The status code given will be displayed at the client.
The error code may be used as a substatus for the HTTP status code as described in the OData protocol specification.- Parameters:
message-locale-status-errorCode-
-
ODataRuntimeApplicationException
public ODataRuntimeApplicationException(String message, Locale locale, HttpStatusCodes status, String errorCode, Throwable e) Since this is a translated application exception locale must not be null.
The status code given will be displayed at the client.
The error code may be used as a substatus for the HTTP status code as described in the OData protocol specification.- Parameters:
message-locale-status-errorCode-e-
-
ODataRuntimeApplicationException
Since this is a translated application exception locale must not be null.- Parameters:
message-locale-e-
-
ODataRuntimeApplicationException
public ODataRuntimeApplicationException(String message, Locale locale, HttpStatusCodes status, Throwable e) Since this is a translated application exception locale must not be null.
The status code given will be displayed at the client.- Parameters:
message-locale-status-e-
-
ODataRuntimeApplicationException
public ODataRuntimeApplicationException(String message, Locale locale, String errorCode, Throwable e) Since this is a translated application exception locale must not be null.
The error code may be used as a substatus for the HTTP status code as described in the OData protocol specification.- Parameters:
message-locale-errorCode-e-
-
-
Method Details
-
getLocale
- Returns:
Localethe locale
-
getHttpStatus
Default HttpStatusCodes.INTERNAL_SERVER_ERROR- Returns:
HttpStatusCodesthe status code
-
getCode
Default code is null- Returns:
- StringThe error code displayed in the error message.
-