Question

I am just getting started on javascript, and I have experience in developing systems in other platforms and languages.

The problems people have with javascript are well known, so i would not repeat them here. But my question is, why isn't there a framework yet for handling error cases?

I can imagine a simple library that catches all exceptions, and handles them in a centralized manner

  1. throws an dialog with all the required variables (in dev environments when a certain var is set)
  2. ajax call that triggers an REST action (so that an email can be sent to the developers)
  3. ignore cases (ignores IE6, known errors, etc)
  4. allow for namespace segmentation, so different namespaces can be handled differently

For example, (1) Will allow easy outsourcing of testing, cause you can essentially get testers from anywhere and get them to record whatever alert messages come up, which will essentially contain all the required conditions

(2) Will catch the production exceptions, and send you an email, but you can ignore cases you want to ignore.

Does this make sense to you guys? Criticize away!

Was it helpful?

Solution

There is no framework for this because its trivial to do it manually.

Add an event handler on window.onerror

Any framework that does this would have to be so generic because your specifications might be different from the next developers specifications.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top