Effects of exception handling on database commits

Typically, if your code throws an exception, Gosu does not commit the current database transaction. This behavior applies to rule sets, PCF code, and other contexts that have a current bundle.

Throw an exception from your code to get this behavior. If you catch exceptions in your code, to ensure that the current bundle is not committed in the current action, rethrow the exception.