@Override protected void notifyHandlerException(ChannelEvent e, Throwable t) { while (t instanceof ChannelPipelineException && t.getCause() != null) { t = t.getCause(); } if (t instanceof CodecEmbedderException) { throw (CodecEmbedderException) t; } else { throw new CodecEmbedderException(t); } } }
@Override protected void notifyHandlerException(ChannelEvent e, Throwable t) { while (t instanceof ChannelPipelineException && t.getCause() != null) { t = t.getCause(); } if (t instanceof CodecEmbedderException) { throw (CodecEmbedderException) t; } else { throw new CodecEmbedderException( t ); } } }
private void handleEvent(ChannelEvent e) { if (e instanceof ExceptionEvent) { throw new CodecEmbedderException( ((ExceptionEvent) e).getCause() ); } else if (e instanceof MessageEvent) { boolean offered = productQueue.offer( ((MessageEvent) e).getMessage() ); assert offered; } else { boolean offered = productQueue.offer( e ); assert offered; } // Swallow otherwise. }
public void exceptionCaught( ChannelPipeline pipeline, ChannelEvent e, ChannelPipelineException cause) throws Exception { Throwable actualCause = cause.getCause(); if (actualCause == null) { actualCause = cause; } throw new CodecEmbedderException( actualCause ); }