Fatal Error triggers Before WP_Error handler
Question
I have this code :
// this will provoke a fatal error because "Grap" without last "h"
$graph = new CanvasGrap(300,100);
if ( is_wp_error($graph) ){ echo "is wp_error"; }
Situation :
- the echo is never showed.
- wordpress crash.
Goals :
- How do I prevent that like a misspelling error crash wordpress?
- Why the message it’s not showed ?
- How do I must code this specific situation to see my custom error message?
0
fatal-error, plugin-development
4 years
2020-02-12T08:41:19-05:00
2020-02-12T08:41:19-05:00 0 Answers
41 views
0
Leave an answer