WP_CLI\Utils

wp_die_handler()WP-CLI 1.0

No Hooks.

Return

null. Nothing.

Usage

wp_die_handler( $message );
$message (required)
-

Code of wp_die_handler() WP-CLI 2.7.0-alpha

function wp_die_handler( $message ) {
	if ( $message instanceof \WP_Error ) {
		$message = $message->get_error_message();
	}

	$message = wp_clean_error_message( $message );

	WP_CLI::error( $message );
}