@@ -485,7 +485,7 @@ protected function _getCgiQuotes()
485
485
486
486
$ debugData ['result ' ] = $ responseBody ;
487
487
$ this ->_setCachedQuotes ($ params , $ responseBody );
488
- } catch (\Exception $ e ) {
488
+ } catch (\Throwable $ e ) {
489
489
$ debugData ['result ' ] = ['error ' => $ e ->getMessage (), 'code ' => $ e ->getCode ()];
490
490
$ responseBody = '' ;
491
491
}
@@ -745,7 +745,7 @@ protected function _getXmlQuotes()
745
745
$ xmlResponse = $ client ->getBody ();
746
746
$ debugData ['result ' ] = $ xmlResponse ;
747
747
$ this ->_setCachedQuotes ($ xmlRequest , $ xmlResponse );
748
- } catch (\Exception $ e ) {
748
+ } catch (\Throwable $ e ) {
749
749
$ debugData ['result ' ] = ['error ' => $ e ->getMessage (), 'code ' => $ e ->getCode ()];
750
750
$ xmlResponse = '' ;
751
751
}
@@ -1033,7 +1033,7 @@ protected function _getXmlTracking($trackings)
1033
1033
$ client ->post ($ url , $ this ->_xmlAccessRequest . $ xmlRequest );
1034
1034
$ xmlResponse = $ client ->getBody ();
1035
1035
$ debugData ['result ' ] = $ xmlResponse ;
1036
- } catch (\Exception $ e ) {
1036
+ } catch (\Throwable $ e ) {
1037
1037
$ debugData ['result ' ] = ['error ' => $ e ->getMessage (), 'code ' => $ e ->getCode ()];
1038
1038
$ xmlResponse = '' ;
1039
1039
}
@@ -1445,14 +1445,14 @@ protected function _sendShipmentAcceptRequest(Element $shipmentConfirmResponse)
1445
1445
$ xmlResponse = $ client ->getBody ();
1446
1446
$ debugData ['result ' ] = $ xmlResponse ;
1447
1447
$ this ->_setCachedQuotes ($ xmlRequest , $ xmlResponse );
1448
- } catch (\Exception $ e ) {
1448
+ } catch (\Throwable $ e ) {
1449
1449
$ debugData ['result ' ] = ['error ' => $ e ->getMessage (), 'code ' => $ e ->getCode ()];
1450
1450
$ xmlResponse = '' ;
1451
1451
}
1452
1452
1453
1453
try {
1454
1454
$ response = $ this ->_xmlElFactory ->create (['data ' => $ xmlResponse ]);
1455
- } catch (\Exception $ e ) {
1455
+ } catch (\Throwable $ e ) {
1456
1456
$ debugData ['result ' ] = ['error ' => $ e ->getMessage (), 'code ' => $ e ->getCode ()];
1457
1457
}
1458
1458
@@ -1493,7 +1493,6 @@ public function getShipAcceptUrl()
1493
1493
*
1494
1494
* @param \Magento\Framework\DataObject $request
1495
1495
* @return \Magento\Framework\DataObject
1496
- * @throws \Exception
1497
1496
*/
1498
1497
protected function _doShipmentRequest (\Magento \Framework \DataObject $ request )
1499
1498
{
@@ -1513,14 +1512,14 @@ protected function _doShipmentRequest(\Magento\Framework\DataObject $request)
1513
1512
$ xmlResponse = $ client ->getBody ();
1514
1513
$ debugData ['result ' ] = $ xmlResponse ;
1515
1514
$ this ->_setCachedQuotes ($ xmlRequest , $ xmlResponse );
1516
- } catch (\Exception $ e ) {
1515
+ } catch (\Throwable $ e ) {
1517
1516
$ debugData ['result ' ] = ['code ' => $ e ->getCode (), 'error ' => $ e ->getMessage ()];
1518
1517
}
1519
1518
}
1520
1519
1521
1520
try {
1522
1521
$ response = $ this ->_xmlElFactory ->create (['data ' => $ xmlResponse ]);
1523
- } catch (\Exception $ e ) {
1522
+ } catch (\Throwable $ e ) {
1524
1523
$ debugData ['result ' ] = ['error ' => $ e ->getMessage (), 'code ' => $ e ->getCode ()];
1525
1524
$ result ->setErrors ($ e ->getMessage ());
1526
1525
}
0 commit comments