-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRM-19739 : New Account Relationship Option Screen does not show excep… #10651
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -299,7 +299,12 @@ public function postProcess() { | |
if ($this->_action & CRM_Core_Action::ADD) { | ||
$params['entity_id'] = $this->_aid; | ||
} | ||
$financialTypeAccount = CRM_Financial_BAO_FinancialTypeAccount::add($params, $ids); | ||
try { | ||
$financialTypeAccount = CRM_Financial_BAO_FinancialTypeAccount::add($params, $ids); | ||
} | ||
catch (CRM_Core_Exception $e) { | ||
CRM_Core_Error::statusBounce($e->getMessage()); | ||
} | ||
CRM_Core_Session::setStatus(ts('The financial type Account has been saved.')); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. L308 should be moved after line 303? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with @pradpnayak - the statusBounce will mean the code does not reach that line, but that will be much clear if you change it as suggested @jitendrapurohit There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved the success message to the specified line for clarity. |
||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, what I was alluding to above is I think this could be
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and updated the code with
statusBounce()
. Thanks for the suggestion 👍