10000 [Serializer] error handling inconsistencies fixed in the serializer decoders by rodrigodiez · Pull Request #9586 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Serializer] error handling inconsistencies fixed in the serializer decoders #9586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from
Closed
Prev Previous commit
Next Next commit
default value managed last
  • Loading branch information
Rodrigo Díez Villamuera committed Nov 23, 2013
commit 0c380b62659b0612aad1728ff9964f7c8d8615f4
6 changes: 3 additions & 3 deletions src/Symfony/Component/Serializer/Encoder/JsonEncoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ public function supportsDecoding($format)
public static function getErrorMessage($error)
{
switch ($error) {
default:
return 'Unknown error';
break;
case JSON_ERROR_DEPTH:
return 'Maximum stack depth exceeded';
break;
Expand All @@ -116,6 +113,9 @@ public static function getErrorMessage($error)
case JSON_ERROR_UTF8:
return 'Malformed UTF-8 characters, possibly incorrectly encoded';
break;
default:
return 'Unknown error';
break;
}
}
}
0