Skip to content

Commit 97389fa

Browse files
committed
use Serializer specific RuntimeException
1 parent cb495fd commit 97389fa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Symfony/Component/Serializer/Serializer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function supportsNormalization($data, $format = null)
139139
{
140140
try {
141141
$this->getNormalizer($data, $format);
142-
} catch (\RuntimeException $e) {
142+
} catch (RuntimeException $e) {
143143
return false;
144144
}
145145

@@ -153,7 +153,7 @@ public function supportsDenormalization($data, $type, $format = null)
153153
{
154154
try {
155155
$this->getDenormalizer($data, $type, $format = null);
156-
} catch (\RuntimeException $e) {
156+
} catch (RuntimeException $e) {
157157
return false;
158158
}
159159

@@ -289,7 +289,7 @@ public function supportsEncoding($format)
289289
{
290290
try {
291291
$this->getEncoder($format);
292-
} catch (\RuntimeException $e) {
292+
} catch (RuntimeException $e) {
293293
return false;
294294
}
295295

@@ -303,7 +303,7 @@ public function supportsDecoding($format)
303303
{
304304
try {
305305
$this->getDecoder($format);
306-
} catch (\RuntimeException $e) {
306+
} catch (RuntimeException $e) {
307307
return false;
308308
}
309309

0 commit comments

Comments
 (0)