diff --git a/setup/modelfactory.class.inc.php b/setup/modelfactory.class.inc.php index c9d92e41c..5a0c6577b 100644 --- a/setup/modelfactory.class.inc.php +++ b/setup/modelfactory.class.inc.php @@ -932,10 +932,12 @@ class ModelFactory $this->aDictKeys[$sLanguageCode][$sCode] = $oXmlEntry; } } - } - catch (Exception $e) + } catch (Exception|Error $e) // Error can occurs on eval() calls { - throw new Exception('Failed to load dictionary file "'.$sPHPFile.'", reason: '.$e->getMessage()); + throw new DictException('Failed to load dictionary file "' . $sPHPFile . '"', [ + 'exception_class' => get_class($e), + 'exception_msg' => $e->getMessage(), + ]); } }