We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61efc58 commit 16ef37fCopy full SHA for 16ef37f
components/process.rst
@@ -24,13 +24,14 @@ The :class:`Symfony\\Component\\Process\\Process` class allows you to execute
24
a command in a sub-process::
25
26
use Symfony\Component\Process\Process;
27
+ use Symfony\Component\Process\Exception\ProcessFailedException;
28
29
$process = new Process('ls -lsa');
30
$process->run();
31
32
// executes after the command finishes
33
if (!$process->isSuccessful()) {
- throw new \RuntimeException($process->getErrorOutput());
34
+ throw new ProcessFailedException($process);
35
}
36
37
echo $process->getOutput();
0 commit comments