I think this is something we should seriously consider here at CNET.

via Ajaxian:
Markku Uttula admitted to coding while drunk and decided to write a little hack that captures JavaScript errors and sends them to his web server log using Ajax.

Would you want to do this? Maybe as part of a usability testing framework?

Implementation

He has one PHP file that does both the error writing, and also acts as the script xsrc= to capture errors:

window.onerror = function (msg, url, lno) {
ajax call back to the server log …

Quirky.