+ Start a Discussion

Feature request - error page

Not sure if this should go here or in IdeaExchange...

It'd be nice if we could designate a VF page to be a catch-all for unhandled exceptions. Maybe this could be a setup-level option.

Currently users are bounced into the native Salesforce UI and shown scary-looking VF errors in bold text. It'd be great to be able to display a friendly, custom page instead.

Ron HessRon Hess
I think you can use a

try {}
catch {}

in your controller to prevent many of these type errors from ending up on the default error page. You can then jump to your own error presentation page.
That makes sense. I do seem to remember some errors which occur during interactions between the View and the Controller - so they'd slip by any try/catch in the Controller. Like say an View references something in the Controller which becomes invalid at runtime.

Maybe I'm wrong about this use-case, but I'll post an example if I find one.