Well, to my knowledge, what you can do is that you can directly set the URL that will be executed (for example, it goes to your general user error page), where you determine the details of the error for a particular site.
Given that you are using IIS 7.0 or 7.5, follow these steps:
- Open IIS Manager
- Go to your site in the "Sites" section.
Click "Error Pages" in the IIS section. 
Next, you will be taken to the error pages defined by IIS. Go to Error Code 500, select it, and click Edit in the Actions panel. 
- Now select the Run URL option and select the shared page, say / sitecore / MyErrorPage / 500ErrorPage.aspx, and then process the site error messages on that particular page.

Hope this helps!
Hello,
Varun Shringarpur
source share