1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-19 23:32:02 +02:00

[ticket/11603] Throw RuntimeExceptions instead of using exit()

PHPBB3-11603
This commit is contained in:
Joas Schilling 2013-06-19 13:45:42 +02:00
parent 1516ae7e7e
commit 99e486dc82
2 changed files with 2 additions and 2 deletions

View File

@ -143,7 +143,7 @@ function api_url_request($url)
if (isset($contents->message) && strpos($contents->message, 'API Rate Limit') === 0)
{
exit('Reached github API Rate Limit. Please try again later' . "\n");
throw new RuntimeException('Reached github API Rate Limit. Please try again later' . "\n", 4);
}
return $contents;

View File

@ -187,7 +187,7 @@ function api_url_request($url)
if (isset($contents->message) && strpos($contents->message, 'API Rate Limit') === 0)
{
exit('Reached github API Rate Limit. Please try again later' . "\n");
throw new RuntimeException('Reached github API Rate Limit. Please try again later' . "\n", 4);
}
return ($sub_request_result) ? array_merge($sub_request_result, $contents) : $contents;