improve error handling
This commit is contained in:
@@ -236,7 +236,9 @@ function booking_stripe_validate_form_payment($form, &$form_state) {
|
||||
drupal_set_message($e->getMessage(), 'error');
|
||||
}
|
||||
catch (\Stripe\Exception\CardException $e) {
|
||||
watchdog('booking', $e->getMessage());
|
||||
$e_json = $e->getJsonBody();
|
||||
watchdog('booking', "Detected exception processing Stripe payment : !message . !error",
|
||||
array('!message' => $e->getMessage(), '!error' => $e_json['error']));
|
||||
drupal_set_message($e->getMessage(), 'error');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user