ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Error Checking
Subject:   Add it, or at least add a warning
Date:   2005-03-18 15:31:05
From:   MatthewDoar
I'd agree that anywhere that someone is likely to cut and paste from should have decent error checking. If this gets in the way of teaching something, then remove the error checking, but add an icon, or a note about "Fragile code ahead", a heavy border to the example code. You get the idea.


I speak from my experience writing and maintaining approx. 50KLOC of examples written in Java, C and IDL for an expensive integration package. Numerous support calls and crises at this company were directly due to earlier versions of the examples that did not include error-checking.


~Matt