mirror of
https://github.com/amphp/parallel.git
synced 2025-01-16 20:28:21 +01:00
Prevent silencing ExitFailure in ProcessContext->join() (#207)
Some checks failed
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, on Windows, windows-latest, nts, 8.3) (push) Has been cancelled
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, on macOS, macos-latest, nts, 8.3) (push) Has been cancelled
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, ubuntu-latest, nts, 8.1) (push) Has been cancelled
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, ubuntu-latest, nts, 8.2) (push) Has been cancelled
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, ubuntu-latest, nts, 8.3) (push) Has been cancelled
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (none, true, with ext-parallel, ubuntu-latest, parallel, ts, 8.2, none, none) (push) Has been cancelled
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (none, true, with ext-parallel, ubuntu-latest, parallel, ts, 8.3, none, none) (push) Has been cancelled
Some checks failed
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, on Windows, windows-latest, nts, 8.3) (push) Has been cancelled
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, on macOS, macos-latest, nts, 8.3) (push) Has been cancelled
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, ubuntu-latest, nts, 8.1) (push) Has been cancelled
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, ubuntu-latest, nts, 8.2) (push) Has been cancelled
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (false, ubuntu-latest, nts, 8.3) (push) Has been cancelled
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (none, true, with ext-parallel, ubuntu-latest, parallel, ts, 8.2, none, none) (push) Has been cancelled
Continuous Integration / PHP ${{ matrix.php-version }} ${{ matrix.job-description }} (none, true, with ext-parallel, ubuntu-latest, parallel, ts, 8.3, none, none) (push) Has been cancelled
This commit is contained in:
parent
9777db1460
commit
5113111de0
@ -281,11 +281,16 @@ final class ProcessContext extends AbstractContext
|
||||
$data = $this->receiveExitResult($cancellation);
|
||||
|
||||
$code = $this->process->join();
|
||||
if ($code !== 0) {
|
||||
throw new ContextException(\sprintf("Context exited with code %d", $code));
|
||||
}
|
||||
|
||||
return $data->getResult();
|
||||
try {
|
||||
return $data->getResult();
|
||||
} finally {
|
||||
if ($code !== 0) {
|
||||
// If an ExitFailure throws above, the exception will be automatically attached as the previous
|
||||
// exception on the instance thrown below.
|
||||
throw new ContextException(\sprintf("Context exited with code %d", $code));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user