File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,9 @@ public function serialize(mixed $serializable): string
1212 {
1313 try {
1414 return $ this ->doSerialize ($ serializable );
15+ } catch (Exception \SerializerCouldNotSerializeData $ exception ) {
16+ throw $ exception ;
1517 } catch (Throwable $ reason ) {
16- if ($ reason instanceof Exception \SerializerCouldNotSerializeData) {
17- throw $ reason ;
18- }
1918 throw new Exception \SerializerCouldNotSerializeData (__METHOD__ , $ serializable , $ reason );
2019 }
2120 }
@@ -24,10 +23,9 @@ public function unserialize(string $serialized): mixed
2423 {
2524 try {
2625 return $ this ->doUnserialize ($ serialized );
26+ } catch (Exception \SerializerCouldNotUnserializeData $ exception ) {
27+ throw $ exception ;
2728 } catch (Throwable $ reason ) {
28- if ($ reason instanceof Exception \SerializerCouldNotUnserializeData) {
29- throw $ reason ;
30- }
3129 throw new Exception \SerializerCouldNotUnserializeData (__METHOD__ , $ serialized , $ reason );
3230 }
3331 }
You can’t perform that action at this time.
0 commit comments