diff options
author | Robin Appelman <robin@icewind.nl> | 2020-02-25 19:37:14 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-03-19 16:27:52 +0300 |
commit | d6a76d2ceae02f3c2cee087971147ee14e4ba0ef (patch) | |
tree | e3cb5ebbb4a30c42384a4f0576334844181de6d2 | |
parent | 193095af32c233aabcdc920e249eef71cec8e41e (diff) |
improve fontmanager error handling
-rw-r--r-- | lib/Document/FontManager.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Document/FontManager.php b/lib/Document/FontManager.php index 077b573..4e92bfc 100644 --- a/lib/Document/FontManager.php +++ b/lib/Document/FontManager.php @@ -61,7 +61,11 @@ class FontManager { ]; $pipes = []; - proc_open($cmd, $descriptorSpec, $pipes, ConverterBinary::BINARY_DIRECTORY, []); + $process = proc_open($cmd, $descriptorSpec, $pipes, ConverterBinary::BINARY_DIRECTORY, []); + + if (!$process) { + throw new \Exception("Failed to start allfontsgen"); + } fclose($pipes[0]); $error = stream_get_contents($pipes[2]); |