*
* @return array
* formatted associated array of elements
+ * @throws CRM_Core_Exception
*/
public static function formattedFields(&$params, $row = FALSE) {
$fields = [];
foreach ($value as $k => $v) {
if (in_array($v[0], $types)) {
if ($contactType && $contactType != $v[0]) {
- CRM_Core_Error::fatal(ts("Cannot have two clauses with different types: %1, %2",
+ throw new CRM_Core_Exception(ts("Cannot have two clauses with different types: %1, %2",
[1 => $contactType, 2 => $v[0]]
));
}