Modular error pages / a way to override wp_die

  1. fritzthecat


    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.

    Posted: 12 years ago #
  2. ma1

    You may want to check this as a temporary patch:

    Posted: 12 years ago #
  3. Simon Wheatley
    Code for the People


    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.

    Posted: 11 years ago #
  4. In 3.0 you can now specify your own wp_die_handler (defaults to _default_wp_die_handler) and handle errors however you want.

    Posted: 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    5 Votes
  • Status

    This idea has been implemented