If you are within a class, I recommend looking at set_error_handler
from here.
set_error_handler(
function($level,$msg,$file,$line) {
echo "Error at ".$file." on line ".$line;
exit;
}
);
4
solved Change warning messages in php [closed]