src/SmartFactory/JsonApiRequestManager.php
public function exitWithException($ex)
    {
        $response_data = [];
    
        $response_data["result"] = "error";
    
        $response_data["errors"] = [
            ["error_code" => "system_error", "error_text" => $ex->getMessage()]
        ];
    
        $this->sendJsonResponse($response_data);
        
        exit;
    }
public function exitWithException($ex)
    {
        $response_data = [];
    
        $response_data["result"] = "error";
    
        $response_data["errors"] = [
            ["error_code" => "system_error", "error_text" => $ex->getMessage()]
        ];
    
        $this->sendJsonResponse($response_data);
        
        exit;
    }
public function exitWithException ( $ ex ) { $ response_data = [ ] ; $ response_data [ "result" ] = "error" ; $ response_data [ "errors" ] = [ [ "error_code" => "system_error" , "error_text" => $ ex -> getMessage ( ) ] ] ; $ this -> sendJsonResponse ( $ response_data ) ; exit ; }
This is an auxiliary function for sending the response in JSON
format by an exception.

@param \Exception $ex
The thrown exception.

@return void

@author Oleg Schildt
This is an auxiliary function for sending the response in JSON format by an exception .