protected function send_error($ex = null) {
        $this->response = $this->generate_error($ex);
        $this->send_headers();
        echo $this->response;
    }
protected function send_error($ex = null) {
        $this->response = $this->generate_error($ex);
        $this->send_headers();
        echo $this->response;
    }
protected function send_error ( $ ex = null ) { $ this -> response = $ this -> generate_error ( $ ex ) ; $ this -> send_headers ( ) ; echo $ this -> response ; }
Send the error information to the WS client.

@param Exception $ex
Send the error information to the WS client .