Add error logging around metar parsing call

This commit is contained in:
Nabeel Shahzad 2019-08-07 13:25:40 -04:00
parent 5cce1b3040
commit f6465bea58
2 changed files with 4 additions and 1 deletions

View File

@ -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 '';
}
}

View File

@ -11,6 +11,7 @@
"ext-calendar": "*",
"ext-json": "*",
"ext-mbstring": "*",
"ext-simplexml": "*",
"ext-pdo": "*",
"composer/composer": "1.8.*",
"laravel/framework": "5.8.*",