Author: elecharny Date: Fri Oct 31 06:50:36 2008 New Revision: 709412 URL: http://svn.apache.org/viewvc?rev=709412&view=rev Log: o Removed the 'final' keyword for the exceptionCaught methods o Added a message in the javadoc to warn the user who might forget to call the messageHandler when overloading those methods.
Modified: mina/trunk/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java Modified: mina/trunk/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java?rev=709412&r1=709411&r2=709412&view=diff ============================================================================== --- mina/trunk/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java (original) +++ mina/trunk/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java Fri Oct 31 06:50:36 2008 @@ -256,8 +256,17 @@ } } + /** + * Invoked when any exception is thrown by user IoHandler implementation + * or by MINA. If cause is an instance of IOException, MINA will close the + * connection automatically. + * + * <b>Warning !</b> If you are to overload this method, be aware that you + * _must_ call the messageHandler in your own method, otherwise it won't + * be called. + */ @Override - public final void exceptionCaught(IoSession session, Throwable cause) throws Exception { + public void exceptionCaught(IoSession session, Throwable cause) throws Exception { ExceptionHandler<Throwable> handler = findExceptionHandler(cause.getClass()); if (handler != null) { handler.exceptionCaught(session, cause);