Skip to content

Commit

Permalink
Fix Exception handling in Mapper
Browse files Browse the repository at this point in the history
  • Loading branch information
theseer committed Mar 3, 2024
1 parent 2076915 commit 8a60f13
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ManifestDocumentMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);
}
}
Expand Down

0 comments on commit 8a60f13

Please sign in to comment.