I've got a script that's using the weather.gov website to pull down weather data. The call looks like this:
$result = $weather->NDFDgen($latitude,$longitude,$product,$startTime,$endTime,$weatherParameters);
Occasionally, they make changes to their database, or an invalid latitude or longitude slips through and I get a nasty error like this:
Fatal error: Uncaught SoapFault exception: [SERVER] Point is not on an NDFD grid...
Is there a clean way to catch the error without breaking out of the entire script? I was considering error handling but there are other items on the page and I don't want to use an error handler for all of them. I basically want to e-mail myself if it hits an error on this SOAP call, but continue processing the script.
Thanks in advance for any guidance.