Hi,
I am extending a bit on Praveen's reply, I would like to suggest you to go for Microsoft Enterprise Library's Logging Block, You can trap those errors and log them either locally on Server's log or store in text or xml or if SMTP settings are there you can even mail those errors with minute details.
So check out Microsoft Enterprise Library , it saves lot of time since you can apply such settings globally in web.config with minimum pain.
Thanks,
Vikram Pendse.
Microsoft MVP
http://pendsevikram.blogspot.com