20.1.6 Customizing Error Message Display
Use an Error Handling Function to customize how users see errors raised from database constraints, trigger exceptions, or the APEX engine.
- Studying Default Error Message Behavior
Review default error messages to see why an Error Handling Function can improve what users see. - Specifying an Error Handling Function
Define an Error Handling Function to rewrite server-side errors before APEX reports them. - Examining Error Handling Function Code
Examine an Error Handling Function that logs internal errors and replaces constraint errors with friendlier messages. - Logging Error Info for Troubleshooting
Log error details in a separate transaction so troubleshooting data survives the rollback. - Experiencing Custom Error Handling
Test custom error handling with constraint violations, database exceptions, and logged internal errors.
Parent topic: Displaying Success and Error Messages