@@ -44,11 +44,10 @@ class DocXEncoder implements EncoderInterface
$this->phpDocx->createDocx($tempFilename);
return file_get_contents($tempFilename);
- } catch (\Throwable $e) {
+ } finally {
if (is_file($tempFilename)) {
unlink($tempFilename);
}
- throw $e;