Fix invalid argument exception
This commit is contained in:
parent
af18e54196
commit
aaa029382a
1 changed files with 3 additions and 4 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue