Jonathan Cogley posts a neat way to trap Javascript errors on a web page, followed by the firing of a server-side exception, so .NET code can be written to email the developer responsible.
http://weblogs.asp.net/jcogley/archive/2005/12/07/432584.aspx