WP_CLI::halt()public staticWP-CLI 1.0

Halt script execution with a specific return code.

Permits script execution to be overloaded by WP_CLI::runcommand()

Method of the class: WP_CLI{}

No Hooks.

Return

never.

Usage

$result = WP_CLI::halt( $return_code );
$return_code(int) (required)
-

WP_CLI::halt() code WP-CLI 2.8.0-alpha

public static function halt( $return_code ) {
	if ( self::$capture_exit ) {
		throw new ExitException( null, $return_code );
	}
	exit( $return_code );
}