Also, what logging framework are you using? I'm not seeing any logging
messages anywhere.

Any exception without a message (in my case, NullPointerException) gets
converted into a generic message (ODataExceptionHandler.java:163) and the
whole exception is basically lost.

Michael.

On Mon, Feb 17, 2020 at 10:45 AM Michael van der Gulik <mike...@gmail.com>
wrote:

> Hi.
>
> I was looking at improving the error handling because I just got a
> completely useless error message out of Olingo.
>
> I was looking at ODataHandlerImpl.java:
>
> } catch (final UriValidationException e) {
>   ODataServerError serverError = 
> ODataExceptionHelper.createServerErrorObject(e, null);
>   handleException(request, response, serverError, e);
> } catch (final UriParserSemanticException e) {
>   ODataServerError serverError = 
> ODataExceptionHelper.createServerErrorObject(e, null);
>   handleException(request, response, serverError, e);
> } catch (final UriParserSyntaxException e) {
>   ODataServerError serverError = 
> ODataExceptionHelper.createServerErrorObject(e, null);
>   handleException(request, response, serverError, e);
>
> (etc, repeat for 12 exceptions).
>
> Would it perhaps be time to code against Java 7 (or higher!) so these can
> be combined into one line? Java 6 kind of happened in the stone age.
>
> Thanks,
> Michael.
>


-- 
http://gulik.pbwiki.com/

Reply via email to