static void processError ( String type , String errString , HttpServerExchange exchange ) { exchange . setStatusCode ( StatusCodes . INTERNAL_SERVER_ERROR ) ; exchange . getResponseHeaders ( ) . add ( Headers . CONTENT_TYPE , CONTENT_TYPE ) ; exchange . getResponseHeaders ( ) . add ( new HttpString ( "Version" ) , VERSION_PROTOCOL ) ; exchange . getResponseHeaders ( ) . add ( new HttpString ( "Type" ) , type ) ; exchange . getResponseHeaders ( ) . add ( new HttpString ( "Mess" ) , errString ) ; exchange . endExchange ( ) ; UndertowLogger . ROOT_LOGGER . mcmpProcessingError ( type , errString ) ; }
Send an error message .