public static function create($message, $messageVariables = null, $code = null, PhpException $previous = null)
    {
        $messageFormat = [
            'message'          => $message,
            'messageVariables' => $messageVariables
        ];

        return new static($messageFormat, $code, $previous);
    }
public static function create($message, $messageVariables = null, $code = null, PhpException $previous = null)
    {
        $messageFormat = [
            'message'          => $message,
            'messageVariables' => $messageVariables
        ];

        return new static($messageFormat, $code, $previous);
    }
public static function create ( $ message , $ messageVariables = null , $ code = null , PhpException $ previous = null ) { $ messageFormat = [ 'message' => $ message , 'messageVariables' => $ messageVariables ] ; return new static ( $ messageFormat , $ code , $ previous ) ; }
Creates a new exception by the given arguments.

@param string       $message          The message format.
@param array        $messageVariables The message variables.
@param int|string   $code             The code of this exception.
@param PhpException $previous         The previous exception.

@return Exception The new exception.
@throws InvalidArgumentException
Creates a new exception by the given arguments .