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

Appearance settings

Commit de3f711

Browse filesBrowse files
kylekatarnlsnicolas-grekas
authored andcommitted
[Serializer] Keep stack trace for enum value denormalizer error
1 parent 6b8b52d commit de3f711
Copy full SHA for de3f711

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php
+1-1Lines 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-
throw new InvalidArgumentException('The data must belong to a backed enumeration of type '.$type);
68+
throw new InvalidArgumentException('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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.