WP_CLI

Process::run_check_stderr()publicWP-CLI 1.0

Run the command, but throw an Exception on error. Same as run_check() above, but checks the correct stderr.

Method of the class: Process{}

No Hooks.

Return

ProcessRun.

Usage

$Process = new Process();
$Process->run_check_stderr();

Process::run_check_stderr() code WP-CLI 2.8.0-alpha

public function run_check_stderr() {
	$r = $this->run();

	if ( $r->return_code || ! empty( $r->stderr ) ) {
		throw new RuntimeException( $r );
	}

	return $r;
}