The onerror Event Handler
It is my opinion that a user would much rather not see an error, that's why I like this simple little script so much.
This Event Handler allows you to have something happen when the page throws an error. The way I've seen it used online is to tell the user what line the error came from. I guess that would be good for the developer, but I'm more concerned about the users. I have taken the onerror Event Handler and put it into a script that will redirect the user to a different page as soon as an error is thrown.
Without any more talking...here's the script:
onerror = redirect;
There's not much to it, eh? I do want to point out a few things though.
Give it a shot.