protected CougarException handleResponseWritingIOException ( Exception e , Class resultClass ) { String errorMessage = "Exception writing " + resultClass . getCanonicalName ( ) + " to http stream" ; IOException ioe = getIOException ( e ) ; if ( ioe == null ) { CougarException ce ; if ( e instanceof CougarException ) { ce = ( CougarException ) e ; } else { ce = new CougarFrameworkException ( errorMessage , e ) ; } return ce ; } //We arrive here when the output pipe is broken. Broken network connections are not //really exceptional and should not be reported by dumping the stack trace. //Instead a summary debug level log message with some relevant info incrementIoErrorsEncountered ( ) ; LOGGER . debug ( "Failed to marshall object of class {} to the output channel. Exception ({}) message is: {}" , resultClass . getCanonicalName ( ) , e . getClass ( ) . getCanonicalName ( ) , e . getMessage ( ) ) ; return new CougarServiceException ( ServerFaultCode . OutputChannelClosedCantWrite , errorMessage , e ) ; }
If an exception is received while writing a response to the client it might be because the that client has closed their connection . If so the problem should be ignored .