Add error logging around metar parsing call
This commit is contained in:
parent
5cce1b3040
commit
f6465bea58
@ -4,7 +4,8 @@ namespace App\Services\Metar;
|
||||
|
||||
use App\Contracts\Metar;
|
||||
use App\Support\Http;
|
||||
use Cache;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Return the raw METAR string from the NOAA Aviation Weather Service
|
||||
@ -39,6 +40,7 @@ class AviationWeather extends Metar
|
||||
}
|
||||
return $xml->data->METAR->raw_text->__toString();
|
||||
} catch (\Exception $e) {
|
||||
Log::error('Error reading METAR: '.$e->getMessage());
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
"ext-calendar": "*",
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-simplexml": "*",
|
||||
"ext-pdo": "*",
|
||||
"composer/composer": "1.8.*",
|
||||
"laravel/framework": "5.8.*",
|
||||
|
Loading…
Reference in New Issue
Block a user