Skip to content

Commit 38b0008

Browse files
thiemowmdeJeroenDeDauw
authored andcommitted
Add missing parameters to EntityIdParsingException (#708)
1 parent 2583a5a commit 38b0008

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/Entity/DispatchingEntityIdParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function parse( $idSerialization ) {
4949
} catch ( InvalidArgumentException $ex ) {
5050
// EntityId::splitSerialization performs some sanity checks which
5151
// might result in an exception. Should this happen, re-throw the exception message
52-
throw new EntityIdParsingException( $ex->getMessage() );
52+
throw new EntityIdParsingException( $ex->getMessage(), 0, $ex );
5353
}
5454
if ( preg_match( $idPattern, $localId ) ) {
5555
return $this->buildId( $idBuilder, $idSerialization );
@@ -84,7 +84,7 @@ private function buildId( $idBuilder, $idSerialization ) {
8484
return call_user_func( $idBuilder, $idSerialization );
8585
} catch ( InvalidArgumentException $ex ) {
8686
// Should not happen, but if it does, re-throw the original message
87-
throw new EntityIdParsingException( $ex->getMessage() );
87+
throw new EntityIdParsingException( $ex->getMessage(), 0, $ex );
8888
}
8989
}
9090

src/Entity/ItemIdParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function parse( $idSerialization ) {
2626
try {
2727
return new ItemId( $idSerialization );
2828
} catch ( InvalidArgumentException $ex ) {
29-
throw new EntityIdParsingException( $ex->getMessage() );
29+
throw new EntityIdParsingException( $ex->getMessage(), 0, $ex );
3030
}
3131
}
3232

0 commit comments

Comments
 (0)