From aaa029382aa1a8f788579fdbb68ae3fcf15890b3 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Fri, 13 Apr 2012 11:01:53 +0200 Subject: [PATCH] Fix invalid argument exception --- src/FFMpeg/FFProbe.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/FFMpeg/FFProbe.php b/src/FFMpeg/FFProbe.php index 3eeed75..21cc477 100644 --- a/src/FFMpeg/FFProbe.php +++ b/src/FFMpeg/FFProbe.php @@ -9,8 +9,7 @@ class FFProbe extends Binary { if ( ! is_file($pathfile)) { - - throw new \RuntimeException($pathfile); + throw new \InvalidArgumentException($pathfile); } $cmd = $this->binary . ' ' . $pathfile . ' -show_format'; @@ -22,7 +21,7 @@ class FFProbe extends Binary { if ( ! is_file($pathfile)) { - throw new \RuntimeException($pathfile); + throw new \InvalidArgumentException($pathfile); } $cmd = $this->binary . ' ' . $pathfile . ' -show_streams'; @@ -38,7 +37,7 @@ class FFProbe extends Binary if ( ! $process->isSuccessful()) { - throw new \RuntimeException('Failed to probe'); + throw new \RuntimeException(sprintf('Failed to probe %s', $command)); } return $process->getOutput();