"An internal server error has occurred" - in Visualforce, just show us the error
When we are working in super-complicated code implementations, we see this:
An internal server error has occurred
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.
Thank you again for your patience and assistance. And thanks for using salesforce.com!
Error ID: 1458724295-2433 (-1376090290)
Very, very frequently. It's because we're pushing the platform past the foresight of the implemention in regards to error handling. We'd like to know what the actual underlying error/stacktrace is.
Troubleshooting code when we get to this point is an utter nightmare, because all we can do is trial and error until it goes away, or until it can throw an error that Salesforce was prepared to handle in the user-facing programming interfaces.
I can understand a reluctance to show the stack trace when it comes to non-Visualforce pages for security reasons, but in our own code, we expect to see mroe helpful debugging info.