Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitde3f711

Browse files
kylekatarnlsnicolas-grekas
authored andcommitted
[Serializer] Keep stack trace for enum value denormalizer error
1 parent6b8b52d commitde3f711

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function denormalize($data, string $type, string $format = null, array $c
6565
return$type::from($data);
6666
}catch (\ValueError$e) {
6767
if (isset($context['has_constructor'])) {
68-
thrownewInvalidArgumentException('The data must belong to a backed enumeration of type'.$type);
68+
thrownewInvalidArgumentException('The data must belong to a backed enumeration of type'.$type,0,$e);
6969
}
7070

7171
throw NotNormalizableValueException::createForUnexpectedDataType('The data must belong to a backed enumeration of type'.$type,$data, [$type],$context['deserialization_path'] ??null,true,0,$e);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp