Skip to content

When executing actions catch Throwable instead of Exception. This will stop...

mattwire requested to merge mattwire/civirules:throwableactions into master

When executing actions catch Throwable instead of Exception. This will stop the site crashing when an action triggers for example a TypeError which otherwise stops things like payments recording correctly.

For example, if you submit a contribution page and use a civirule to immediately send an email, but the email action triggers a TypeError then the user will see a failure and the payment may or may not be captured and may or may not be recorded in CiviCRM. By catching Throwable instead of Exception (which is a subclass) we ensure that an action failure does not stop the complete process from working!

Merge request reports

Loading