EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
catch function exceptions for base functions
Yurii1168a075e633
diff --git a/application/Espo/Core/Formula/Processor.php b/application/Espo/Core/Formula/Processor.phpindex e77f7820b5..55414f0b8b 100644--- a/application/Espo/Core/Formula/Processor.php+++ b/application/Espo/Core/Formula/Processor.php@@ -108,6 +108,10 @@ class Processorreturn $function->process($item->getArgumentList());} catch (UndefinedKey $e) {throw UndefinedKey::cloneWithLevelRisen($e);+ } catch (TooFewArguments|BadArgumentType|BadArgumentValue $e) {+ $message = sprintf('Function %s; %s', $item->getType(), $e->getLogMessage());++ throw new Error($message);} catch (FunctionRuntimeError $e) {$message = sprintf('Function %s; %s', $item->getType(), $e->getMessage());