From: Vincent Vanwaelscappel Date: Mon, 25 Sep 2023 12:21:42 +0000 (+0200) Subject: wip #6298 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=5e4917a612b31857bc8485240dca3834978038ad;p=fluidbook-toolbox.git wip #6298 @0.5 --- diff --git a/app/Fluidbook/Farm.php b/app/Fluidbook/Farm.php index 77297099b..4dd8b12e6 100644 --- a/app/Fluidbook/Farm.php +++ b/app/Fluidbook/Farm.php @@ -10,6 +10,7 @@ use hollodotme\FastCGI\Requests\PostRequest; use hollodotme\FastCGI\SocketConnections\NetworkSocket; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Log; +use Mockery\Exception; class Farm { @@ -150,7 +151,11 @@ 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) { @@ -193,10 +198,10 @@ class Farm 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;