I\'m writing a script in PHP5 that requires the code of certain files. When A file is not available for inclusion, first a warning and then a fatal error are thrown. I\'d li
You can accomplish this by using set_error_handler in conjunction with ErrorException.
The example from the ErrorException page is:
ErrorException
Once you have errors being handled as exceptions you can do something like: