As a developer you know how things work and always do the same actions, you say hey look error free. Get a user that has a happy click finger and watch your application die right before your eyes. Wait it will not be before your eyes since you have no clue where this user is sitting using your application. Since it is a clientside error will not even know that this is happening! One thing people seem to forget is that these wonderful clientside applications may be full of errors and destroy your application. Bug free code is a dream, but with browser quirks and such, you can never test everything. So we probably need to do something about this. "
Where was I when the brains were given out? This is awesome! Combining window.onerror with an Ajax posting of the error message back to the server is an excellent way to log frontend errors.