Skip to content

Commit 292e11f

Browse files
Merge pull request #13 from matthieumota/master
Throw exception when pdfinfo binary not found
2 parents 666d2d6 + 842dc94 commit 292e11f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
namespace Howtomakeaturn\PDFInfo\Exceptions;
3+
4+
use \Exception;
5+
6+
class CommandNotFoundException extends Exception{};

src/Howtomakeaturn/PDFInfo/PDFInfo.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ private function loadOutput()
6363
throw new Exceptions\PDFPermissionException();
6464
} else if ( $returnVar === 99 ){
6565
throw new Exceptions\OtherException();
66+
} else if ( $returnVar === 127 ){
67+
throw new Exceptions\CommandNotFoundException();
6668
}
6769

6870
$this->output = $output;

0 commit comments

Comments
 (0)