From e6b0848f177eb937ac95a25416b4f3c437e52896 Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Wed, 9 Dec 2015 16:47:28 +1300 Subject: [PATCH] add code to help track down intermittant test fail --- CRM/Core/LegacyErrorHandler.php | 1 + CRM/Member/BAO/Membership.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CRM/Core/LegacyErrorHandler.php b/CRM/Core/LegacyErrorHandler.php index a25dc320c7..837fbc34c4 100644 --- a/CRM/Core/LegacyErrorHandler.php +++ b/CRM/Core/LegacyErrorHandler.php @@ -26,6 +26,7 @@ class CRM_Core_LegacyErrorHandler { // you should log a ticket for it to be removed with details about the form you were on. if (!empty($params['legacy_redirect_path'])) { if (CRM_Utils_System::isDevelopment()) { + $intentionalENotice = "How did you get HERE?! - Please log in JIRA"; // here we could set a message telling devs to log it per above } CRM_Utils_System::redirect($params['legacy_redirect_path'], $params['legacy_redirect_query']); diff --git a/CRM/Member/BAO/Membership.php b/CRM/Member/BAO/Membership.php index 807b26cd7e..21d8cc2469 100644 --- a/CRM/Member/BAO/Membership.php +++ b/CRM/Member/BAO/Membership.php @@ -272,7 +272,11 @@ class CRM_Member_BAO_Membership extends CRM_Member_DAO_Membership { 'legacy_redirect_path' => 'civicrm/contact/view', 'legacy_redirect_query' => "reset=1&force=1&cid={$params['contact_id']}&selectedChild=member", ); - throw new CRM_Core_Exception(ts('The membership cannot be saved because the status cannot be calculated.'), 0, $errorParams); + throw new CRM_Core_Exception(ts( + "The membership cannot be saved because the status cannot be calculated for start_date: $start_date end_date $end_date join_date $join_date as at " . date('Y-m-d H:i:s')), + 0, + $errorParams + ); } $params['status_id'] = $calcStatus['id']; } -- 2.25.1