#41655 closed enhancement (fixed)
Enable dead_db() to be trappable always.
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Database | Keywords: | has-patch |
Focuses: | Cc: |
Description
It would be handy if dead_db()
could be made trappable always, either through using wp_die()
instead of die()
in the terse case, or via a filter.
It currently causes WP-CLI (see https://github.com/wp-cli/wp-cli/pull/4303) to resort to a brittle hack in order to trap database connection errors.
Attachments (5)
Change History (14)
#1
@
6 years ago
The above are before/afters if die()
were replaced by wp_die()
in the terse case, eg
wp_die( '<h1>' . __( 'Error establishing a database connection' ) . '</h1>', __( 'Database Error' ) );
Note: See
TracTickets for help on using
tickets.
Terse die() at 360 width Firefox.