Class ODataApplicationException

All Implemented Interfaces:
Serializable

public class ODataApplicationException extends ODataException
Exception thrown by OData service implementations.
See Also:
  • Constructor Details

    • ODataApplicationException

      public ODataApplicationException(String msg, int statusCode, Locale locale)
      Exception in an OData service implementation.
      Parameters:
      msg - the text of the exception
      statusCode - the HTTP status code of the error response; the default is 500 - Internal Server Error
      locale - a Locale to enable translation of error messages
      See Also:
    • ODataApplicationException

      public ODataApplicationException(String msg, int statusCode, Locale locale, String oDataErrorCode)
      Exception in an OData service implementation.
      Parameters:
      msg - the text of the exception
      statusCode - the HTTP status code of the error response; the default is 500 - Internal Server Error
      locale - a Locale to enable translation of error messages
      oDataErrorCode - the error code of the exception as defined by the OData standard
      See Also:
    • ODataApplicationException

      public ODataApplicationException(String msg, int statusCode, Locale locale, Throwable cause)
      Exception in an OData service implementation.
      Parameters:
      msg - the text of the exception
      statusCode - the HTTP status code of the error response; the default is 500 - Internal Server Error
      locale - a Locale to enable translation of error messages
      cause - the cause of this exception
      See Also:
    • ODataApplicationException

      public ODataApplicationException(String msg, int statusCode, Locale locale, Throwable cause, String oDataErrorCode)
      Exception in an OData service implementation.
      Parameters:
      msg - the text of the exception
      statusCode - the HTTP status code of the error response; the default is 500 - Internal Server Error
      locale - a Locale to enable translation of error messages
      cause - the cause of this exception
      oDataErrorCode - the error code of the exception as defined by the OData standard
      See Also:
  • Method Details

    • getStatusCode

      public int getStatusCode()
      Will return the status code which will be used as a status code for the HTTP response. If not set the default is a 500 Internal Server Error.
      Returns:
      status code for this exception
    • getLocale

      public Locale getLocale()
      Returns the Locale which was used for the error message. The default is null.
      Returns:
      locale used for the error message
    • getODataErrorCode

      public String getODataErrorCode()
      This method will return the error code specified by the application. The default is null.
      Returns:
      the applications error code.