Debugging & exceptions
Last updated on
30 April 2025
Payment offers its own PaymentException class that extends PHP's built-in exceptions.
Every time a PaymentExeption is thrown, a log message (Watchdog) is created and the exception's message is displayed on-screen for debugging purposes, unless this behavior was explicitly disabled at Administration » Configuration » Web services » Payment » Global configuration.

A PaymentException can have three meanings:
- It is just to let the system know something happened which was allowed to happen. Payment validation is an example, since payment methods are allowed to invalidate a payment if they simply don't support them. This is the case in the image above.
- Something unusual happened: Most exceptions will be thrown if something went wrong, but if you don't see any other messages other than the debug message, this means the system caught the exception and gracefully dealt with it.
- Uncaught exceptions: sometimes exceptions aren't caught and gracefully dealt with. This will result in an Fatal error: Uncaught exception ... error, which means something definitely went wrong.
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion