From 718716f26b5a24725a22d62cf356241b90033a61 Mon Sep 17 00:00:00 2001 From: Michael Babker Date: Sat, 9 May 2015 13:00:55 -0400 Subject: [PATCH] One more --- .../com_patchtester/PatchTester/Model/PullModel.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/administrator/components/com_patchtester/PatchTester/Model/PullModel.php b/administrator/components/com_patchtester/PatchTester/Model/PullModel.php index 88ddd40..763be3a 100644 --- a/administrator/components/com_patchtester/PatchTester/Model/PullModel.php +++ b/administrator/components/com_patchtester/PatchTester/Model/PullModel.php @@ -132,7 +132,15 @@ class PullModel extends \JModelBase { // Get the Github object $github = Helper::initializeGithub(); - $rate = $github->authorization->getRateLimit(); + + try + { + $rate = $github->authorization->getRateLimit(); + } + catch (\Exception $e) + { + throw new \RuntimeException(\JText::sprintf('COM_PATCHTESTER_COULD_NOT_CONNECT_TO_GITHUB', $e->getMessage())); + } // If over the API limit, we can't build this list if ($rate->resources->core->remaining == 0)