@Deprecated public void writeException(HttpRequest request, HttpResponse response, Throwable e) { writeException(request, response, e, t -> {}); }
protected void internalResume(Throwable t, Consumer<Throwable> onComplete) { ResteasyContext.pushContextDataMap(contextDataMap); HttpRequest httpRequest = (HttpRequest) contextDataMap.get(HttpRequest.class); HttpResponse httpResponse = (HttpResponse) contextDataMap.get(HttpResponse.class); try { dispatcher.writeException(httpRequest, httpResponse, t, onComplete); }catch(Throwable t2) { // ignore t2 and report the original exception without going through filters dispatcher.unhandledAsynchronousException(httpResponse, t); onComplete.accept(t); } }
protected Void handle(ResteasyRequestWrapper requestWrapper, HttpResponse response) throws Exception { SynchronousDispatcher dispatcher = (SynchronousDispatcher)deployment.getDispatcher(); dispatcher.writeException(requestWrapper.getHttpRequest(), response, failure, t -> {}); return null; }
public void asynchronousExceptionDelivery(HttpRequest request, HttpResponse response, Throwable exception, Consumer<Throwable> onComplete) { try { pushContextObjects(request, response); writeException(request, response, exception, t -> { if(t != null) unhandledAsynchronousException(response, t); onComplete.accept(null); ResteasyContext.removeContextDataLevel(); }); } catch (Throwable ex) { unhandledAsynchronousException(response, ex); onComplete.accept(ex); } }
protected void writeResponse(HttpRequest request, HttpResponse response, Response jaxrsResponse) { try { ServerResponseWriter.writeNomapResponse((BuiltResponse) jaxrsResponse, request, response, providerFactory, t -> { if(t != null) writeException(request, response, t, t2 -> {}); }); } catch (Exception e) { //logger.error("writeResponse() failed mapping exception", e); writeException(request, response, e, t -> {}); } finally { RESTEasyTracingLogger tracingLogger = RESTEasyTracingLogger.getInstance(request); tracingLogger.log("FINISHED", response.getStatus()); tracingLogger.flush(response.getOutputHeaders()); } }
dispatcher.writeException(request, response, e.getCause(), t -> {}); dispatcher.writeException(request, response, e, t -> {}); dispatcher.writeException(request, response, e, t -> {}); return null;
dispatcher.writeException(httpRequest, response, t, t2 -> {}); }); dispatcher.writeException(httpRequest, response, e, t -> {});
writeException(request, response, e.getCause(), t->{}); return; writeException(request, response, e, t->{}); return;
writeException(request, response, failure, t->{}); return;
writeException(request, response, e, t -> { });
writeException(request, response, exception, t -> {}); return;
@Deprecated public void writeException(HttpRequest request, HttpResponse response, Throwable e) { writeException(request, response, e, t -> {}); }
@Deprecated public void writeException(HttpRequest request, HttpResponse response, Throwable e) { writeException(request, response, e, t -> {}); }
protected void writeResponse(HttpRequest request, HttpResponse response, Response jaxrsResponse) { try { ServerResponseWriter.writeNomapResponse((BuiltResponse) jaxrsResponse, request, response, providerFactory, t -> { if(t != null) writeException(request, response, t, t2 -> {}); }); } catch (Exception e) { //logger.error("writeResponse() failed mapping exception", e); writeException(request, response, e, t -> {}); } }
protected void internalResume(Throwable t, Consumer<Throwable> onComplete) { ResteasyProviderFactory.pushContextDataMap(contextDataMap); HttpRequest httpRequest = (HttpRequest) contextDataMap.get(HttpRequest.class); HttpResponse httpResponse = (HttpResponse) contextDataMap.get(HttpResponse.class); dispatcher.writeException(httpRequest, httpResponse, t, onComplete); }
private void writeException(Throwable t) { HttpRequest httpRequest = (HttpRequest) contextDataMap.get(HttpRequest.class); HttpResponse httpResponse = (HttpResponse) contextDataMap.get(HttpResponse.class); SynchronousDispatcher dispatcher = (SynchronousDispatcher) contextDataMap.get(Dispatcher.class); try { dispatcher.writeException(httpRequest, httpResponse, t, t2 -> {}); }catch(Throwable x) { dispatcher.unhandledAsynchronousException(httpResponse, x); } }
private void writeException(Throwable t) { HttpRequest httpRequest = (HttpRequest) contextDataMap.get(HttpRequest.class); HttpResponse httpResponse = (HttpResponse) contextDataMap.get(HttpResponse.class); SynchronousDispatcher dispatcher = (SynchronousDispatcher) contextDataMap.get(Dispatcher.class); try { dispatcher.writeException(httpRequest, httpResponse, t, onComplete); }catch(Throwable x) { dispatcher.unhandledAsynchronousException(httpResponse, x); LogMessages.LOGGER.unhandledAsynchronousException(x); onComplete.accept(null); } }
protected void internalResume(Throwable t, Consumer<Throwable> onComplete) { ResteasyContext.pushContextDataMap(contextDataMap); HttpRequest httpRequest = (HttpRequest) contextDataMap.get(HttpRequest.class); HttpResponse httpResponse = (HttpResponse) contextDataMap.get(HttpResponse.class); try { dispatcher.writeException(httpRequest, httpResponse, t, onComplete); }catch(Throwable t2) { // ignore t2 and report the original exception without going through filters dispatcher.unhandledAsynchronousException(httpResponse, t); onComplete.accept(t); } }
public void asynchronousExceptionDelivery(HttpRequest request, HttpResponse response, Throwable exception, Consumer<Throwable> onComplete) { try { pushContextObjects(request, response); writeException(request, response, exception, t -> { if(t != null) unhandledAsynchronousException(response, t); onComplete.accept(null); ResteasyContext.removeContextDataLevel(); }); } catch (Throwable ex) { unhandledAsynchronousException(response, ex); onComplete.accept(ex); } }
public void asynchronousExceptionDelivery(HttpRequest request, HttpResponse response, Throwable exception, Consumer<Throwable> onComplete) { try { pushContextObjects(request, response); writeException(request, response, exception, t -> { if(t != null) unhandledAsynchronousException(response, t); onComplete.accept(null); ResteasyProviderFactory.removeContextDataLevel(); }); } catch (Throwable ex) { onComplete.accept(ex); unhandledAsynchronousException(response, ex); } }