use hollodotme\FastCGI\SocketConnections\NetworkSocket;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
+use Mockery\Exception;
class Farm
{
if (file_exists($path)) {
return $path;
}
- return self::_getFile($params, 0);
+ try {
+ return self::_getFile($params, 0);
+ } catch (Exception $e) {
+ return false;
+ }
});
if ((!$res || !file_exists($res)) && $attempts > 0) {
if (!$res) {
if ($attempts > 0) {
- Log::warning('Farm failure : ' . $output);
+ Log::warning('Farm failure ('.$farmer['name'].') : ' . $output);
return static::_getFile($params, $attempts - 1);
}
- throw new \Exception('Farm failure : ' . $output);
+ throw new \Exception('Farm failure ('.$farmer['name'].') : ' . $output);
}
return $res;