From 6e31a040b259728c0061cd519fc535d015d709be Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 4 Dec 2018 10:48:55 +0100 Subject: [PATCH] Display error log instead of fatal error in case of Exception when modifying an object in console --- core/dbobject.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/dbobject.class.php b/core/dbobject.class.php index 178b4036f..588670093 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -2404,7 +2404,8 @@ abstract class DBObject implements iDisplay } catch (Exception $e) { - throw $e; + $aErrors = array($e->getMessage()); + throw new CoreCannotSaveObjectException(array('id' => $this->GetKey(), 'class' => $sClass, 'issues' => $aErrors)); } finally {