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