Thursday, 5 September 2013

Turn off or disallow fatal errors during script run?

Turn off or disallow fatal errors during script run?

We have a while(1) script that loops through its' various workings, then
sleeps for 60 seconds and then goes through it all again. This script
needs to run 24/7.
As we add new functionality within the while(1) loop, or just over the
course of random issues, sometimes they fail and unfortunately crash the
entire script. The solution has been wrapping any such functions in
eval{}, but my question is...Is there anyway to globally set that all
errors or fatals do NOT halt/kill the entire script so we don't have to
wrap everything around the eval{} ?

No comments:

Post a Comment