// 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();