From 16ef37f4cf948136ced7d2591b097447e2b85537 Mon Sep 17 00:00:00 2001 From: Abdellatif Ait boudad Date: Sat, 17 Oct 2015 09:17:18 +0000 Subject: [PATCH] [Process] use ProcessFailedException instead of RuntimeException. --- components/process.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/process.rst b/components/process.rst index cf4962836f6..348b466c5e5 100644 --- a/components/process.rst +++ b/components/process.rst @@ -24,13 +24,14 @@ The :class:`Symfony\\Component\\Process\\Process` class allows you to execute a command in a sub-process:: use Symfony\Component\Process\Process; + use Symfony\Component\Process\Exception\ProcessFailedException; $process = new Process('ls -lsa'); $process->run(); // executes after the command finishes if (!$process->isSuccessful()) { - throw new \RuntimeException($process->getErrorOutput()); + throw new ProcessFailedException($process); } echo $process->getOutput();