V2.00 03-Jun-2009 BETA .011
lots of code rearrangement - improvements
- fixed error handling for when the NOAA servers are having problems. Soft failures are printed in html comments as usual. (hopefully I did not break stuff for when NOAA is working again)
- fixed potential problem if NOAA servers fail while fetching fullMessages, it will fall back to $fullMessagesMode off so that it can still show the summary alert message instead of an error. (assuming you still have a valid summary alert message available.) Soft failures are printed in html comments as usual.
- changes to simplify graceful_error function.
Here is an example of what you get if NOAA server is having a Mysql problem:
Your visitor sees:
"Advisory Information Unavailable, error fetching or reading data from the NOAA advisories server."
Many times when an error like this happens there is a long delay while fetching, so the error is cached for your set cache interval.
Your visitor can refresh and there is no delay.
View the source of the HTML:
<div class="advisoryBoxnoactive"><!-- advisories.php - V2.00 03-Jun-2009 BETA .011 -->
<!-- using cached version from rss-advisory-2009-WAZ021.txt - age=23 secs. Next fetch in 577 secs. -->
<!-- Warning: cache file size = 90 is too small.. XML data not found. -->
<!-- Cache file HTML contents: Lost connection to MySQL server at 'reading initial communication packet', system error: 0 -->
<p>Advisory Information Unavailable, error fetching or reading data from the <a href="http://www.weather.gov/alerts-beta/wwaatmget.php?x=WAZ021">NOAA advisories server.</a></p>
<!-- zone=WAZ021 -->
</div>
Any time you want to troubleshoot a problem, view the source of the HTML
Edit: beta 11 has a problem, stay tuned for beta 12....