From ff9970b2be3cabcb3d798a3d2e7d29269dc06228 Mon Sep 17 00:00:00 2001 From: iks Date: Mon, 11 Apr 2016 17:17:43 +0300 Subject: [PATCH] Catch exception from CSaleOrder::Update --- intaro.intarocrm/classes/general/ICrmOrderActions.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/intaro.intarocrm/classes/general/ICrmOrderActions.php b/intaro.intarocrm/classes/general/ICrmOrderActions.php index b40f915f..55440954 100644 --- a/intaro.intarocrm/classes/general/ICrmOrderActions.php +++ b/intaro.intarocrm/classes/general/ICrmOrderActions.php @@ -904,7 +904,15 @@ else{ } if(!empty($arFields)) { - CSaleOrder::Update($order['externalId'], $arFields); + try { + CSaleOrder::Update($order['externalId'], $arFields); + } catch (Exception $e) { + self::eventLog( + 'ICrmOrderActions::orderHistory', 'CSaleOrder::Update', + $e->getCode() . ': ' . $e->getMessage() . ' (order external id: '.$order['externalId'].')' + ); + continue; + } } if(isset($order['status']) && $order['status']) {