From 7f985f8c6f94f743a4e9bad29306156d60686a71 Mon Sep 17 00:00:00 2001 From: yashodha Date: Mon, 23 Mar 2020 17:22:46 +0530 Subject: [PATCH] log error message instead of throwing exception --- Civi/Token/TokenCompatSubscriber.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Civi/Token/TokenCompatSubscriber.php b/Civi/Token/TokenCompatSubscriber.php index d9b186e1f3..2b47388fcb 100644 --- a/Civi/Token/TokenCompatSubscriber.php +++ b/Civi/Token/TokenCompatSubscriber.php @@ -63,7 +63,8 @@ class TokenCompatSubscriber implements EventSubscriberInterface { $contact = reset($contact); if (!$contact || is_a($contact, 'CRM_Core_Error')) { // FIXME: Need to differentiate errors which kill the batch vs the individual row. - throw new TokenException("Failed to generate token data. Invalid contact ID: " . $row->context['contactId']); + CRM_Core_Error::debug_log_message("Failed to generate token data. Invalid contact ID: " . $row->context['contactId']); + continue; } //update value of custom field token -- 2.25.1