File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
app/code/Magento/Sales/Controller/Adminhtml/Order/Create Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -90,10 +90,18 @@ public function execute()
90
90
}
91
91
$ resultRedirect ->setPath ('sales/order/view ' , ['order_id ' => $ orderId ]);
92
92
} else {
93
- $ order ->setReordered (true );
94
- $ this ->_getSession ()->setUseOldShippingMethod (true );
95
- $ this ->_getOrderCreateModel ()->initFromOrder ($ order );
96
- $ resultRedirect ->setPath ('sales/* ' );
93
+ try {
94
+ $ order ->setReordered (true );
95
+ $ this ->_getSession ()->setUseOldShippingMethod (true );
96
+ $ this ->_getOrderCreateModel ()->initFromOrder ($ order );
97
+ $ resultRedirect ->setPath ('sales/* ' );
98
+ } catch (\Magento \Framework \Exception \LocalizedException $ e ) {
99
+ $ this ->messageManager ->addErrorMessage ($ e ->getMessage ());
100
+ return $ resultRedirect ->setPath ('sales/* ' );
101
+ } catch (\Exception $ e ) {
102
+ $ this ->messageManager ->addException ($ e , __ ('Error while processing order. ' ));
103
+ return $ resultRedirect ->setPath ('sales/* ' );
104
+ }
97
105
}
98
106
99
107
return $ resultRedirect ;
You can’t perform that action at this time.
0 commit comments