make($provider_class_name)->$method(...$arguments); } catch (\Throwable $e) { $this->latest_error = $e->getMessage(); Log::error("Failed calling method {$method} for {$symbol} ({$provider}): {$this->latest_error}"); } } // don't need to throw error if calling exists method... if ($method == 'exists') { // symbol prob just doesn't exist return false; } throw new \Exception("Could not get market data calling method {$method}: {$this->latest_error}"); } }