Fix itny bugs

This commit is contained in:
Henry Whitaker
2021-04-10 13:48:03 +01:00
parent b82b7c6307
commit f92c040f63
3 changed files with 41 additions and 17 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Console\Commands;
use App\Exceptions\SpeedtestFailureException;
use App\Helpers\SpeedtestHelper;
use App\Interfaces\SpeedtestProvider;
use Illuminate\Console\Command;
@@ -45,9 +46,9 @@ class SpeedtestCommand extends Command
{
$this->info('Running speedtest, this might take a while...');
$results = $this->speedtestProvider->run(false, false);
if (!is_object($results)) {
try {
$results = $this->speedtestProvider->run(false, false);
} catch (SpeedtestFailureException $e) {
$this->error('Something went wrong running the speedtest.');
exit();
}