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
public class ODataException extends Exception
Base exception for allOData-related exceptions.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ODataException()ODataException(String msg)ODataException(String msg, Throwable e)ODataException(Throwable e)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ODataApplicationExceptiongetApplicationExceptionCause()Search for and return first (from top)ODataApplicationExceptionin the cause hierarchy.ODataHttpExceptiongetHttpExceptionCause()Search for and return first (from top)ODataHttpExceptionin the cause hierarchy.ODataMessageExceptiongetMessageExceptionCause()Search for and return first (from top)ODataMessageExceptionin the cause hierarchy.booleanisCausedByApplicationException()Checks whether this exception is an or was caused by anODataApplicationExceptionexception.booleanisCausedByHttpException()Checks whether this exception is an or was caused by anODataHttpExceptionexception.booleanisCausedByMessageException()Checks 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
-
-
-
-
Method Detail
-
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
public ODataHttpException 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
public ODataMessageException 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
public ODataApplicationException 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
-
-