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 encode(string $decoded): string
1212 {
1313 try {
1414 return $ this ->doEncode ($ decoded );
15+ } catch (Exception \CoderCouldNotEncodeData $ exception ) {
16+ throw $ exception ;
1517 } catch (Throwable $ reason ) {
16- if ($ reason instanceof Exception \CoderCouldNotEncodeData) {
17- throw $ reason ;
18- }
1918 throw new Exception \CoderCouldNotEncodeData (__METHOD__ , $ decoded , $ reason );
2019 }
2120 }
@@ -24,10 +23,9 @@ public function decode(string $encoded): string
2423 {
2524 try {
2625 return $ this ->doDecode ($ encoded );
26+ } catch (Exception \CoderCouldNotDecodeData $ exception ) {
27+ throw $ exception ;
2728 } catch (Throwable $ reason ) {
28- if ($ reason instanceof Exception \CoderCouldNotDecodeData) {
29- throw $ reason ;
30- }
3129 throw new Exception \CoderCouldNotDecodeData (__METHOD__ , $ encoded , $ reason );
3230 }
3331 }
You can’t perform that action at this time.
0 commit comments