If this is for an external website, I try to handle errors in detail during the development phase. After the site is ready to work live, I try not to give too detailed information to the end user about errors, especially about the details of the database for security reasons.
This is not some kind of answer set in stone, but remember about security when reporting and processing errors on external sites. Just a note, as this may not be an external website.
source
share