Java Code Examples for org.apache.olingo.odata2.api.exception.ODataException#getApplicationExceptionCause()
The following examples show how to use
org.apache.olingo.odata2.api.exception.ODataException#getApplicationExceptionCause() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ODataExceptionWrapper.java From olingo-odata2 with Apache License 2.0 | 5 votes |
private Exception extractException(final Exception exception) { if (exception instanceof ODataException) { ODataException odataException = (ODataException) exception; if (odataException.isCausedByApplicationException()) { return odataException.getApplicationExceptionCause(); } else if (odataException.isCausedByHttpException()) { return odataException.getHttpExceptionCause(); } else if (odataException.isCausedByMessageException()) { return odataException.getMessageExceptionCause(); } } return exception; }
Example 2
Source File: ODataExceptionWrapper.java From olingo-odata2 with Apache License 2.0 | 5 votes |
private Exception extractException(final Exception exception) { if (exception instanceof ODataException) { ODataException odataException = (ODataException) exception; if (odataException.isCausedByApplicationException()) { return odataException.getApplicationExceptionCause(); } else if (odataException.isCausedByHttpException()) { return odataException.getHttpExceptionCause(); } else if (odataException.isCausedByMessageException()) { return odataException.getMessageExceptionCause(); } } return exception; }