public ODataExceptionWrapper(final ODataContext context, final Map<String, String> queryParameters, final List<String> acceptHeaderContentTypes) { contentType = getContentType(queryParameters, acceptHeaderContentTypes).toContentTypeString(); messageLocale = MessageService.getSupportedLocale(getLanguages(context), DEFAULT_RESPONSE_LOCALE); httpRequestHeaders = context.getRequestHeaders(); try { requestUri = context.getPathInfo().getRequestUri(); errorContext.setPathInfo(context.getPathInfo()); callback = getErrorHandlerCallbackFromContext(context); } catch (Exception e) { throw new ODataRuntimeException("Exception occurred", e); } }
public ODataExceptionWrapper(final ODataContext context, final Map<String, String> queryParameters, final List<String> acceptHeaderContentTypes) { contentType = getContentType(queryParameters, acceptHeaderContentTypes).toContentTypeString(); messageLocale = MessageService.getSupportedLocale(getLanguages(context), DEFAULT_RESPONSE_LOCALE); httpRequestHeaders = context.getRequestHeaders(); try { requestUri = context.getPathInfo().getRequestUri(); errorContext.setPathInfo(context.getPathInfo()); callback = getErrorHandlerCallbackFromContext(context); } catch (Exception e) { throw new ODataRuntimeException("Exception occurred", e); } }
public ODataExceptionWrapper(final ODataContext context, final Map<String, String> queryParameters, final List<String> acceptHeaderContentTypes) { contentType = getContentType(queryParameters, acceptHeaderContentTypes).toContentTypeString(); messageLocale = MessageService.getSupportedLocale(getLanguages(context), DEFAULT_RESPONSE_LOCALE); httpRequestHeaders = context.getRequestHeaders(); try { requestUri = context.getPathInfo().getRequestUri(); errorContext.setPathInfo(context.getPathInfo()); callback = getErrorHandlerCallbackFromContext(context); } catch (Exception e) { throw new ODataRuntimeException("Exception occurred", e); } }