protected static void writeErrorResponse ( final Channel channel , final ManagementRequestHeader header , final Throwable error ) throws IOException { final ManagementResponseHeader response = ManagementResponseHeader . create ( header , error ) ; final MessageOutputStream output = channel . writeMessage ( ) ; try { writeHeader ( response , output ) ; output . close ( ) ; } finally { StreamUtils . safeClose ( output ) ; } }
Write an error response .