File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
app/code/Magento/Checkout/Model Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 11
11
use Magento \Checkout \Api \PaymentProcessingRateLimiterInterface ;
12
12
use Magento \Checkout \Api \PaymentSavingRateLimiterInterface ;
13
13
use Magento \Framework \App \ObjectManager ;
14
+ use Magento \Framework \Exception \LocalizedException ;
14
15
use Magento \Quote \Api \CartRepositoryInterface ;
15
16
use Magento \Framework \Exception \CouldNotSaveException ;
16
17
use Magento \Quote \Model \Quote ;
@@ -139,9 +140,13 @@ public function savePaymentInformationAndPlaceOrder(
139
140
}
140
141
try {
141
142
$ orderId = $ this ->cartManagement ->placeOrder ($ cartId );
142
- } catch (\ Magento \ Framework \ Exception \ LocalizedException $ e ) {
143
+ } catch (LocalizedException $ e ) {
143
144
$ this ->logger ->critical (
144
- 'Placing an order with quote_id ' . $ cartId . ' is failed: ' . $ e ->getMessage ()
145
+ 'Placing an Order failed (reason: ' . $ e ->getMessage () .') ' ,
146
+ [
147
+ 'quote_id ' => $ cartId ,
148
+ 'exception ' => (string )$ e
149
+ ]
145
150
);
146
151
throw new CouldNotSaveException (
147
152
__ ($ e ->getMessage ()),
Original file line number Diff line number Diff line change @@ -152,7 +152,11 @@ public function savePaymentInformationAndPlaceOrder(
152
152
$ orderId = $ this ->cartManagement ->placeOrder ($ cartId );
153
153
} catch (LocalizedException $ e ) {
154
154
$ this ->logger ->critical (
155
- 'Placing an order with quote_id ' . $ cartId . ' is failed: ' . $ e ->getMessage ()
155
+ 'Placing an Order failed (reason: ' . $ e ->getMessage () .') ' ,
156
+ [
157
+ 'quote_id ' => $ cartId ,
158
+ 'exception ' => (string )$ e
159
+ ]
156
160
);
157
161
throw new CouldNotSaveException (
158
162
__ ($ e ->getMessage ()),
You can’t perform that action at this time.
0 commit comments