Jump to content

[SOLVED] Can I Pause of stop a php script at an error message?


ahvceo

Recommended Posts

 

By setting a php error handler, you can do this. It is possible to log the errors or you can stop the execution.

 

Please have a look on the php function:

 

set_error_handler("customErrorHandler");

function customErrorHandler($error_level, $error_message, $error_file, $error_line, $error_context)
{ 
		exit("$error_message");

// You can also, log the error to a php file and can be view from there also.
                       

}


 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.