@ SuppressWarnings ( "PMD.AvoidCatchingThrowable" ) private void print ( final Request req , final OutputStream output ) throws IOException { try { new RsPrint ( this . take . act ( req ) ) . print ( output ) ; } catch ( final HttpException ex ) { new RsPrint ( BkBasic . failure ( ex , ex . code ( ) ) ) . print ( output ) ; // @checkstyle IllegalCatchCheck (7 lines) } catch ( final Throwable ex ) { new RsPrint ( BkBasic . failure ( ex , HttpURLConnection . HTTP_INTERNAL_ERROR ) ) . print ( output ) ; } }
Print response to output stream safely .