/** * Safe write error response. * * @param channel the channel * @param header the request header * @param error the exception */ protected static void safeWriteErrorResponse(final Channel channel, final ManagementProtocolHeader header, final Exception error) { if(header.getType() == ManagementProtocol.TYPE_REQUEST) { try { writeErrorResponse(channel, (ManagementRequestHeader) header, error); } catch(IOException ioe) { ProtocolLogger.ROOT_LOGGER.tracef(ioe, "failed to write error response for %s on channel: %s", header, channel); } } }
/** * Safe write error response. * * @param channel the channel * @param header the request header * @param error the exception */ protected static void safeWriteErrorResponse(final Channel channel, final ManagementProtocolHeader header, final Throwable error) { if(header.getType() == ManagementProtocol.TYPE_REQUEST) { try { writeErrorResponse(channel, (ManagementRequestHeader) header, error); } catch(IOException ioe) { ProtocolLogger.ROOT_LOGGER.tracef(ioe, "failed to write error response for %s on channel: %s", header, channel); } } }
/** * Safe write error response. * * @param channel the channel * @param header the request header * @param error the exception */ protected static void safeWriteErrorResponse(final Channel channel, final ManagementProtocolHeader header, final Throwable error) { if(header.getType() == ManagementProtocol.TYPE_REQUEST) { try { writeErrorResponse(channel, (ManagementRequestHeader) header, error); } catch(IOException ioe) { ProtocolLogger.ROOT_LOGGER.tracef(ioe, "failed to write error response for %s on channel: %s", header, channel); } } }