Add error logging around metar parsing call
This commit is contained in:
@@ -4,7 +4,8 @@ namespace App\Services\Metar;
|
|||||||
|
|
||||||
use App\Contracts\Metar;
|
use App\Contracts\Metar;
|
||||||
use App\Support\Http;
|
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
|
* 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();
|
return $xml->data->METAR->raw_text->__toString();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
Log::error('Error reading METAR: '.$e->getMessage());
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
"ext-calendar": "*",
|
"ext-calendar": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
|
"ext-simplexml": "*",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
"composer/composer": "1.8.*",
|
"composer/composer": "1.8.*",
|
||||||
"laravel/framework": "5.8.*",
|
"laravel/framework": "5.8.*",
|
||||||
|
|||||||
Reference in New Issue
Block a user