[#20] fixed exception handling
This commit is contained in:
parent
3463da4514
commit
9b5165f5a6
3 changed files with 6 additions and 4 deletions
|
@ -150,7 +150,7 @@ function civicrm_api3_twingle_donation_Cancel($params) {
|
|||
|
||||
$result = civicrm_api3_create_success($contribution);
|
||||
}
|
||||
catch (CiviCRM_API3_Exception $exception) {
|
||||
catch (Exception $exception) {
|
||||
$result = civicrm_api3_create_error($exception->getMessage());
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ function civicrm_api3_twingle_donation_endrecurring($params) {
|
|||
|
||||
$result = civicrm_api3_create_success($contribution);
|
||||
}
|
||||
catch (CiviCRM_API3_Exception $exception) {
|
||||
catch (Exception $exception) {
|
||||
$result = civicrm_api3_create_error($exception->getMessage());
|
||||
}
|
||||
|
||||
|
|
|
@ -701,14 +701,16 @@ function civicrm_api3_twingle_donation_Submit($params) {
|
|||
} catch (Exception $ex) {
|
||||
// TODO: more error handling?
|
||||
Civi::log()->debug("Twingle membership postprocessing call {$pp_entity}.{$pp_action} has failed: " . $ex->getMessage());
|
||||
throw new Exception(
|
||||
E::ts("Twingle membership postprocessing call has failed, see log for more information")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$result = civicrm_api3_create_success($result_values);
|
||||
}
|
||||
catch (CiviCRM_API3_Exception $exception) {
|
||||
catch (Exception $exception) {
|
||||
$result = civicrm_api3_create_error($exception->getMessage());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue