protected function _handleXMLHTTPCommandException(\Throwable $e)
    {
		// send xmlhttp headers
		header("Content-Type: application/json; charset=utf-8");
		
		// no cache
		header("Expires: Sat, 1 Jan 2005 00:00:00 GMT");
		header("Last-Modified: ".gmdate( "D, d M Y H:i:s")." GMT");
		header("Cache-Control: no-cache, must-revalidate");
		header("Pragma: no-cache"); 
        
        
		// get exception string (stack trace)
        $ex = $this->_getException($e, 'Error during async request');
        
        echo json_encode(array('statut'=>false, 'message'=>'Error during async request', 'exception'=>$ex));
    }
protected function _handleXMLHTTPCommandException(\Throwable $e)
    {
		// send xmlhttp headers
		header("Content-Type: application/json; charset=utf-8");
		
		// no cache
		header("Expires: Sat, 1 Jan 2005 00:00:00 GMT");
		header("Last-Modified: ".gmdate( "D, d M Y H:i:s")." GMT");
		header("Cache-Control: no-cache, must-revalidate");
		header("Pragma: no-cache"); 
        
        
		// get exception string (stack trace)
        $ex = $this->_getException($e, 'Error during async request');
        
        echo json_encode(array('statut'=>false, 'message'=>'Error during async request', 'exception'=>$ex));
    }
protected function _handleXMLHTTPCommandException ( \ Throwable $ e ) { // send xmlhttp headers header ( "Content-Type: application/json; charset=utf-8" ) ; // no cache header ( "Expires: Sat, 1 Jan 2005 00:00:00 GMT" ) ; header ( "Last-Modified: " . gmdate ( "D, d M Y H:i:s" ) . " GMT" ) ; header ( "Cache-Control: no-cache, must-revalidate" ) ; header ( "Pragma: no-cache" ) ; // get exception string (stack trace) $ ex = $ this -> _getException ( $ e , 'Error during async request' ) ; echo json_encode ( array ( 'statut' => false , 'message' => 'Error during async request' , 'exception' => $ ex ) ) ; }
Handle an exception during an XMLHTTP request.

The XMLHTTP request JSON response will contain a 'exception' property with the exception data formatted as a human-readable string.
The JSON formatted exception is outputed directly to standard output.

@param \Throwable $e Exception
Handle an exception during an XMLHTTP request .