2
I am finalizing my project and soon I will put the site in my hosting. I don’t want my user to see a "Warning" message or any other. Instead I want it to appear: "An error has occurred, Contact us. If possible, send a print of the problem."
2
I am finalizing my project and soon I will put the site in my hosting. I don’t want my user to see a "Warning" message or any other. Instead I want it to appear: "An error has occurred, Contact us. If possible, send a print of the problem."
1
It is possible to define a Exception Handler to manipulate all exceptions or errors not dealt with set_exception_handler
, just pass any callable for him:
set_exception_handler(function ($e) {
echo 'Ocorreu um erro, Entre em contato conosco. Se possível, mande um print do problema.';
echo 'Mensagem do erro: ' . $e->getMessage();
});
Browser other questions tagged php
You are not signed in. Login or sign up in order to post.
Does that help you? https://answall.com/q/34814/5878
– Woss
Can’t change the PHP7 settings to modify the error text? php.ini or something like that?
– Luizinho
I believe not and it does not seem feasible.
– Woss
Okay, I’ll try here then, vlw!
– Luizinho