When SharePoint cannot talk to configuration database, provide a customized error message rather than the default Runtime Error.
We don’t mind the detailed error message shows in the ugly yellow background page, but the default 500 error message should be better.
[This is as per Do you use a customized error page to handle an unhandled error occurs on your website?]