33
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2025-01-09 17:13:58 +00:00
This commit is contained in:
Michael Babker 2015-05-09 13:00:55 -04:00
parent 23aa89ae9d
commit 718716f26b

View File

@ -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)