Modular error pages / a way to override wp_die
Some scripts (for example wp-comments-post.php) call wp_die if things go wrong. wp_die has HTML hard coded within it (!) - this is no good practice.
I think WP needs a more modular way of dealing with error pages - perhaps a control panel / plugin which lists all the possibile error message (HTTP '404', '500', plus WP-specific error codes like 'empty comment posted' etc) and allows you assign specific templates or hooks to them.
Would be very cool to be able to replace wp_die with something which (on dev sites) generated a stack trace and gave the possibility showing a friendly 500 and emailing an error report.
In 3.0 you can now specify your own wp_die_handler (defaults to _default_wp_die_handler) and handle errors however you want.
RSS feed for this topic
This topic has been closed to new replies.