Not a bad idea! Very clever, in fact. The custom tracking tools in Analytics are just that: custom tools that you can use for whatever meets your needs.
Part of me worries that those with Javascript disabled aren't going to get reported to Analytics, but that percentage gets smaller and smaller.
On a related note: you might consider checking out the beta Analytics feature called "Intelligence." You can set up custom reports so if any numbers are abnormally high or low, it'll email you. Could be a nice way to keep an eye on how well your site is working.
An alternative would be to report the error via AJAX that spits out all the error info in an email. It works well enough for lower-traffic applications and doesn't take much to set up.