added the handling of exceptions caught by netty