WordPress.org

Ideas

Modular error pages / a way to override wp_die

  1. fritzthecat
    Member

    12345

    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: 7 years ago #
  2. ma1
    Member

    You may want to check this as a temporary patch:
    http://hackademix.net/blog/2007/07/31/themed-error-pages/

    Posted: 7 years ago #
  3. Simon Wheatley
    Member

    12345

    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: 7 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: 5 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    12345
    5 Votes
  • Status

    This idea has been implemented