Merge pull request #19036 from civicrm/5.32
[civicrm-core.git] / CRM / Core / BAO / LabelFormat.php
index 175d599410bfe207560ab21264a09c271cd8fcf0..8678560c9cf30a693035e0d4ea34b5872fda3168 100644 (file)
@@ -527,7 +527,7 @@ class CRM_Core_BAO_LabelFormat extends CRM_Core_DAO_OptionValue {
     // make sure serialized array will fit in the 'value' column
     $attribute = CRM_Core_DAO::getAttribute('CRM_Core_BAO_LabelFormat', 'value');
     if (strlen($this->value) > $attribute['maxlength']) {
-      CRM_Core_Error::fatal(ts('Label Format does not fit in database.'));
+      throw new CRM_Core_Exception(ts('Label Format does not fit in database.'));
     }
     $this->save();