From 8a60f13688ae42bcd52031d9ff3bf3d21faf05a3 Mon Sep 17 00:00:00 2001 From: Arne Blankerts Date: Sun, 3 Mar 2024 13:15:19 +0100 Subject: [PATCH] Fix Exception handling in Mapper --- src/ManifestDocumentMapper.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ManifestDocumentMapper.php b/src/ManifestDocumentMapper.php index c5d797a..3da6403 100644 --- a/src/ManifestDocumentMapper.php +++ b/src/ManifestDocumentMapper.php @@ -13,6 +13,7 @@ use PharIo\Version\Exception as VersionException; use PharIo\Version\Version; use PharIo\Version\VersionConstraintParser; +use Throwable; use function sprintf; class ManifestDocumentMapper { @@ -32,9 +33,7 @@ public function map(ManifestDocument $document): Manifest { $requirements, $bundledComponents ); - } catch (VersionException $e) { - throw new ManifestDocumentMapperException($e->getMessage(), (int)$e->getCode(), $e); - } catch (Exception $e) { + } catch (Throwable $e) { throw new ManifestDocumentMapperException($e->getMessage(), (int)$e->getCode(), $e); } }