Clarification on the overhead of throwing an error

This commit is contained in:
Trustin Lee 2008-11-28 14:47:49 +00:00
parent 1b2dfc1dd5
commit d20d338a3a

View File

@ -99,6 +99,11 @@ import org.jboss.netty.handler.codec.frame.FrameDecoder;
* back to the 'initial' position (i.e. the beginning of the buffer) and call
* the {@code decode(..)} method again when more data is received into the
* buffer.
* <p>
* Please note that the overhead of throwing an {@link Error} is minimal unlike
* throwing a new {@link Exception} in an ordinary way. {@link ReplayingDecoder}
* reuses the same {@link Error} instance so that it does not need to fill its
* stack trace, which takes most of {@link Exception} initialization time.
*
* <h3>Limitations</h3>
* <p>