-
-
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
Clean up error handling in legacy functions in import parser #19160
Conversation
(Standard links)
|
return civicrm_api3_create_error('Invalid value for custom field \'' . | ||
CRM_Utils_Array::value('name', $custom) . '\'' | ||
throw new CRM_Core_Exception('Invalid value for custom field \'' . | ||
$custom['name'] . '\'' |
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 in theory it could have returned NULL here right?
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.
@seamuslee001 yeah - there is some risk this would give an e-notice but it seems like our metadata is more consistent now so less of this belt & braces handling is better
Looks fine to me lets see what the tests say |
test fails look to relate |
61d1634
to
3fe5ba0
Compare
@eileenmcnaughton test fails still occurring |
@seamuslee001 yeah - I think I have to take a step back on this & clean up some of the weird duplicate stuff first - the first step (the weird if-else stuff) is merged now so will look again |
b3fcc8e
to
f93665e
Compare
Jenkins re test this please |
This makes the handling of errors cleaner & makes it easier for us to unravel what is going on here.
f93665e
to
eba173d
Compare
Overview
Clean up error handling in legacy functions in import parser
Before
Complicated error handling and code hard to move around because of the return statements
After
straight forward exception handling approach
Technical Details
This makes the handling of errors cleaner & makes it easier for us to unravel what is going on here.
Comments
@seamuslee001 this is another minor clean up step. I think it's going to make sense to copy the formatProfileContact into the import now that most of the first move is tidied up & then we can switch to calling the api - which will handle your bug