@Override public void handle(HttpServerExchange exchange, byte[] message) { try { handleHttp2Upgrade(exchange, upgrade, settings, message); } catch (IOException e) { UndertowLogger.REQUEST_IO_LOGGER.ioException(e); exchange.endExchange(); } } });
@Override public void handleException(StreamSourceFrameChannel streamSourceFrameChannel, IOException e) { UndertowLogger.REQUEST_IO_LOGGER.ioException(e); IoUtils.safeClose(streamSourceFrameChannel, channel); } }, new ChannelExceptionHandler<StreamSinkFrameChannel>() {
@Override public void onException(final HttpServerExchange exchange, final Sender sender, final IOException exception) { UndertowLogger.REQUEST_IO_LOGGER.ioException(exception); exchange.endExchange(); } });
@Override public void handleException(StreamSinkFrameChannel streamSinkFrameChannel, IOException e) { UndertowLogger.REQUEST_IO_LOGGER.ioException(e); IoUtils.safeClose(streamSinkFrameChannel, channel); } }, channel.getBufferPool()
@Override public void onException(final HttpServerExchange exchange, final Sender sender, final IOException exception) { UndertowLogger.REQUEST_IO_LOGGER.ioException(exception); exchange.endExchange(); } };
private void handleError(Throwable t) { IOException e = t instanceof IOException ? (IOException) t : new IOException(t); UndertowLogger.REQUEST_IO_LOGGER.ioException(e); IoUtils.safeClose(Http2ClientConnection.this); for (Map.Entry<Integer, Http2ClientExchange> entry : currentExchanges.entrySet()) { try { entry.getValue().failed(e); } catch (Exception ex) { UndertowLogger.REQUEST_IO_LOGGER.ioException(new IOException(ex)); } } }
@Override public void onException(final HttpServerExchange exchange, final Sender sender, final IOException exception) { UndertowLogger.REQUEST_IO_LOGGER.ioException(exception); future.setException(exception); } });
protected void handleError(StreamSinkChannel channel, IOException e) { UndertowLogger.REQUEST_IO_LOGGER.ioException(e); IoUtils.safeClose(channel); }
@Override public void error(HttpServerExchange exchange, IOException e) { e.printStackTrace(); exchange.setStatusCode(StatusCodes.INTERNAL_SERVER_ERROR); UndertowLogger.REQUEST_IO_LOGGER.ioException(e); exchange.endExchange(); } };
private void flushChannelIgnoreFailure(StreamSinkChannel stream) { try { flushChannel(stream); } catch (IOException e) { UndertowLogger.REQUEST_IO_LOGGER.ioException(e); } catch (Throwable t) { UndertowLogger.REQUEST_IO_LOGGER.handleUnexpectedFailure(t); } }
@Override public void onException(final HttpServerExchange exchange, final Sender sender, final IOException exception) { UndertowLogger.REQUEST_IO_LOGGER.ioException(exception); entry.dereference(); exchange.endExchange(); } }
@Override public void handleException(ConduitStreamSinkChannel channel, IOException exception) { UndertowLogger.REQUEST_IO_LOGGER.ioException(exception); IoUtils.safeClose(connection); IoUtils.safeClose(additional); } }));
@Override public void handleException(T t, IOException e) { UndertowLogger.REQUEST_IO_LOGGER.ioException(e); IoUtils.safeClose(t); IoUtils.safeClose(closable); } }
@Override public void onException(final HttpServerExchange exchange, final Sender sender, final IOException exception) { UndertowLogger.REQUEST_IO_LOGGER.ioException(exception); try { entry.dereference(); } finally { callback.onException(exchange, sender, exception); } } }
private void handleError(IOException exception) { UndertowLogger.REQUEST_IO_LOGGER.ioException(exception); currentRequest.setFailed(exception); currentRequest = null; pendingResponse = null; safeClose(connection); }
@Override protected PooledByteBuffer preWriteTransform(PooledByteBuffer body) { try { return super.preWriteTransform(extensionFunction.transformForWrite(body, this, this.isFinalFrameQueued())); } catch (IOException e) { UndertowLogger.REQUEST_IO_LOGGER.ioException(e); markBroken(); throw new RuntimeException(e); } } }
@Override public void onException(final HttpServerExchange exchange, final Sender sender, final IOException exception) { UndertowLogger.REQUEST_IO_LOGGER.ioException(exception); try { exchange.endExchange(); } finally { IoUtils.safeClose(exchange.getConnection()); } } }
@Override public void handleEvent(StreamSourceChannel channel) { try { doHttp2PriRead(connection, buffer, serverConnection, extraData); } catch (IOException e) { UndertowLogger.REQUEST_IO_LOGGER.ioException(e); IoUtils.safeClose(connection); } catch (Throwable t) { UndertowLogger.REQUEST_IO_LOGGER.handleUnexpectedFailure(t); IoUtils.safeClose(connection); } } });
@Override public void error(HttpServerExchange exchange, IOException e) { if(!exchange.isResponseStarted()) { exchange.setStatusCode(StatusCodes.INTERNAL_SERVER_ERROR); } exchange.setPersistent(false); UndertowLogger.REQUEST_IO_LOGGER.ioException(e); exchange.endExchange(); } };
@Override public void handleEvent(Http2Channel channel) { try { final AbstractHttp2StreamSourceChannel frame = channel.receive(); if (frame == null) { return; } if (frame instanceof Http2StreamSourceChannel) { handleRequests(channel, (Http2StreamSourceChannel) frame); } } catch (IOException e) { UndertowLogger.REQUEST_IO_LOGGER.ioException(e); IoUtils.safeClose(channel); } catch (Throwable t) { UndertowLogger.REQUEST_IO_LOGGER.handleUnexpectedFailure(t); IoUtils.safeClose(channel); } }