WP_CLI

Runner::help_wp_die_handler()publicWP-CLI 1.0

Error handler for wp_die() the command is help to try to trap errors (db connection failure in particular) during WordPress load.

Method of the class: Runner{}

No Hooks.

Return

null. Nothing.

Usage

$Runner = new Runner();
$Runner->help_wp_die_handler( $message );
$message (required)
-

Runner::help_wp_die_handler() code WP-CLI 2.8.0-alpha

public function help_wp_die_handler( $message ) {
	$help_exit_warning = 'Error during WordPress load.';
	if ( $message instanceof WP_Error ) {
		$help_exit_warning = Utils\wp_clean_error_message( $message->get_error_message() );
	} elseif ( is_string( $message ) ) {
		$help_exit_warning = Utils\wp_clean_error_message( $message );
	}
	$this->run_command_and_exit( $help_exit_warning );
}