Skip to content

Commit 718716f

Browse files
author
Michael Babker
committed
One more
1 parent 23aa89a commit 718716f

File tree

1 file changed

+9
-1
lines changed
  • administrator/components/com_patchtester/PatchTester/Model

1 file changed

+9
-1
lines changed

administrator/components/com_patchtester/PatchTester/Model/PullModel.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,15 @@ public function apply($id)
132132
{
133133
// Get the Github object
134134
$github = Helper::initializeGithub();
135-
$rate = $github->authorization->getRateLimit();
135+
136+
try
137+
{
138+
$rate = $github->authorization->getRateLimit();
139+
}
140+
catch (\Exception $e)
141+
{
142+
throw new \RuntimeException(\JText::sprintf('COM_PATCHTESTER_COULD_NOT_CONNECT_TO_GITHUB', $e->getMessage()));
143+
}
136144

137145
// If over the API limit, we can't build this list
138146
if ($rate->resources->core->remaining == 0)

0 commit comments

Comments
 (0)