ProtocolDecoderException e = new ProtocolDecoderException( "No appropriate message decoder: " + dump); e.setHexdump(dump); } else if (result == MessageDecoder.NOT_OK) { currentDecoder = null; throw new ProtocolDecoderException( "Message decoder returned NOT_OK."); } else {
throw new ProtocolDecoderException( "Expected LF after CR but was: " + b);
@Override public void sessionClosed(NextFilter nextFilter, IoSession session) throws Exception { // Call finishDecode() first when a connection is closed. ProtocolDecoder decoder = getDecoder(session); ProtocolDecoderOutput decoderOut = getDecoderOut(session, nextFilter); try { decoder.finishDecode(session, decoderOut); } catch (Throwable t) { ProtocolDecoderException pde; if (t instanceof ProtocolDecoderException) { pde = (ProtocolDecoderException) t; } else { pde = new ProtocolDecoderException(t); } throw pde; } finally { // Dispose all. disposeEncoder(session); disposeDecoder(session); disposeDecoderOut(session); decoderOut.flush(); } nextFilter.sessionClosed(session); }
pde = (ProtocolDecoderException) t; } else { pde = new ProtocolDecoderException(t);