Class ODataException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.olingo.odata2.api.exception.ODataException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ODataApplicationException,ODataMessageException
Base exception for all
OData-related exceptions.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSearch for and return first (from top)ODataApplicationExceptionin the cause hierarchy.Search for and return first (from top)ODataHttpExceptionin the cause hierarchy.Search for and return first (from top)ODataMessageExceptionin the cause hierarchy.booleanChecks whether this exception is an or was caused by anODataApplicationExceptionexception.booleanChecks whether this exception is an or was caused by anODataHttpExceptionexception.booleanChecks whether this exception is an or was caused by anODataMessageExceptionexception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ODataException
public ODataException() -
ODataException
-
ODataException
-
ODataException
-
-
Method Details
-
isCausedByHttpException
public boolean isCausedByHttpException()Checks whether this exception is an or was caused by anODataHttpExceptionexception.- Returns:
trueif this is an or was caused by anODataHttpException, otherwisefalse
-
getHttpExceptionCause
Search for and return first (from top)ODataHttpExceptionin the cause hierarchy. If there is noODataHttpExceptionin the cause hierarchy,NULLis returned.- Returns:
- the first found
ODataHttpExceptionin the cause exception hierarchy orNULLif noODataHttpExceptionis found in the cause hierarchy
-
isCausedByApplicationException
public boolean isCausedByApplicationException()Checks whether this exception is an or was caused by anODataApplicationExceptionexception.- Returns:
trueif this is an or was caused by anODataApplicationException, otherwisefalse
-
isCausedByMessageException
public boolean isCausedByMessageException()Checks whether this exception is an or was caused by anODataMessageExceptionexception.- Returns:
trueif this is an or was caused by anODataMessageException, otherwisefalse
-
getMessageExceptionCause
Search for and return first (from top)ODataMessageExceptionin the cause hierarchy. If there is noODataMessageExceptionin the cause hierarchyNULLis returned.- Returns:
- the first found
ODataMessageExceptionin the cause exception hierarchy orNULLif noODataMessageExceptionis found in the cause hierarchy
-
getApplicationExceptionCause
Search for and return first (from top)ODataApplicationExceptionin the cause hierarchy. If there is noODataApplicationExceptionin the cause hierarchyNULLis returned.- Returns:
- the first found
ODataApplicationExceptionin the cause exception hierarchy orNULLif noODataApplicationExceptionis found in the cause hierarchy
-