Skip to content

Commit c1d89d7

Browse files
authored
Throw previous exception if available
1 parent 7622faf commit c1d89d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Model/Document/Operation/CreateFromFile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function execute(DocumentTypeInterface $documentType, string $file): Docu
5151
return $this->documentRepository->save($document);
5252
} catch (CouldNotSaveException $e) {
5353
$this->fileHelper->moveFile($destFilePath, $file);
54-
throw $e;
54+
throw $e->getPrevious() ?? $e;
5555
}
5656
}
5757
}

0 commit comments

Comments
 (0)