Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I find the StripeApiService::call
method quite handy because of the built-in logging. However I would like to be able to also catch execeptions on my code so I can act accordingly insetad of just relying on null
checking which provide very little information.
Comment | File | Size | Author |
---|---|---|---|
#5 | allow_for_stripe-2834605-5.patch | 2.24 KB | sean_e_dietrich |
#4 | allow_for_stripe-2834605-4.patch | 2.23 KB | sean_e_dietrich |
#3 | allow_for_stripe_d7-2834605-3.patch | 727 bytes | welly |
#2 | allow_for_stripe-2834605-2.patch | 2.38 KB | esclapes |
Comments
Comment #2
esclapes CreditAttribution: esclapes as a volunteer commentedHere is a patch that uses a second method with an extra parameter for whether on not to re-throw. I did not want to change the signature of the call method, so I moved the logic to the new one.
Comment #3
welly CreditAttribution: welly at Fat Beehive commentedThanks for this, I've created a D7 backport of your patch which works very well.
Comment #4
sean_e_dietrichPatch #2 cannot be applied to the recent dev version and fails when being applied. Rerolled the patch to work with the latest version of the dev branch.
Comment #5
sean_e_dietrichI actually realized that now after uploading the previous patch it was incorrect as it called the wrong variable names. Modified patch to use the correct variables.