Skip to content

Commit

Permalink
Merge pull request #13 from matthieumota/master
Browse files Browse the repository at this point in the history
Throw exception when pdfinfo binary not found
  • Loading branch information
howtomakeaturn authored Jan 10, 2019
2 parents 666d2d6 + 842dc94 commit 292e11f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
namespace Howtomakeaturn\PDFInfo\Exceptions;

use \Exception;

class CommandNotFoundException extends Exception{};
2 changes: 2 additions & 0 deletions src/Howtomakeaturn/PDFInfo/PDFInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ private function loadOutput()
throw new Exceptions\PDFPermissionException();
} else if ( $returnVar === 99 ){
throw new Exceptions\OtherException();
} else if ( $returnVar === 127 ){
throw new Exceptions\CommandNotFoundException();
}

$this->output = $output;
Expand Down

0 comments on commit 292e11f

Please sign in to comment.