I want to suppress the timeout error in a script that is running automatically. The fact that the script is timing out is not a problem since it will be running again in a minute after the timeout. I DO want all other errors reported.
Any ideas?
I want to suppress the timeout error in a script that is running automatically. The fact that the script is timing out is not a problem since it will be running again in a minute after the timeout. I DO want all other errors reported.
Any ideas?
In case @nikic's answer is not what you are after, you can use
set_error_handler
— Sets a user-defined error handler functionto setup a custom error handler that can handle the particular error.
set_time_limit(0);
This will simply remove the timeout. Maybe that's enough?
function suppress_timeout() {
if (connection_status() == CONNECTION_TIMEOUT) {
// do your own thing here
}
}
register_shutdown_function("suppress_timeout");