Merge pull request #40 from tgabi333/master
minor exception message cleanup
This commit is contained in:
commit
1c504e9b4d
2 changed files with 6 additions and 7 deletions
|
|
@ -74,7 +74,7 @@ abstract class Binary implements AdapterInterface
|
|||
public function setTimeout($timeout)
|
||||
{
|
||||
if (0 > $timeout) {
|
||||
throw new InvalidArgumentException('Timeout must be a positive value');
|
||||
throw new InvalidArgumentException('Timeout must be a non-negative value');
|
||||
}
|
||||
|
||||
$this->timeout = $timeout;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ class FFMpeg extends Binary
|
|||
if (!file_exists($pathfile)) {
|
||||
$this->logger->addError(sprintf('FFmpeg failed to open %s', $pathfile));
|
||||
|
||||
throw new InvalidArgumentException(sprintf('File %s does not exists', $pathfile));
|
||||
throw new InvalidArgumentException(sprintf('File %s does not exist', $pathfile));
|
||||
}
|
||||
|
||||
$this->logger->addInfo(sprintf('FFmpeg opens %s', $pathfile));
|
||||
|
|
@ -181,7 +181,6 @@ class FFMpeg extends Binary
|
|||
$process = $builder->getProcess();
|
||||
$process->setTimeout($this->timeout);
|
||||
|
||||
|
||||
$this->logger->addInfo(sprintf('FFmpeg executes command %s', $process->getCommandline()));
|
||||
|
||||
try {
|
||||
|
|
@ -327,9 +326,9 @@ class FFMpeg extends Binary
|
|||
}
|
||||
|
||||
if ($originalHeight !== null && $originalWidth !== null) {
|
||||
$this->logger->addInfo(sprintf('Read dimension for resizin succesful : %s x %s', $originalWidth, $originalHeight));
|
||||
$this->logger->addInfo(sprintf('Read dimension for resizing succesful : %s x %s', $originalWidth, $originalHeight));
|
||||
} else {
|
||||
$this->logger->addInfo(sprintf('Read dimension for resizin failed !'));
|
||||
$this->logger->addInfo(sprintf('Read dimension for resizing failed !'));
|
||||
}
|
||||
|
||||
if ($originalHeight !== null && $originalWidth !== null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue