At 4:24 PM -0500 11/8/01, Steven H. Schwartz wrote: >"Peter Epstein" <[EMAIL PROTECTED]> wrote in message >news:67388@palm-dev-forum... >>While I heartily agree that if the docs say is returns an error code it >>should do just that, I take exception to the ideal of returning error codes >>rather than giving fatal errors. The problem with error codes is that it's >>all too easy to forget to check for them, and this can lead to latent bugs. >>By catching bugs early, the developer is freed from having to back-track to >>figure out what went wrong. This is straight out of the book "Writing Solid >>Code". > >Peter, >You're right -- it's easy to ignore returned error codes. However, >signalling fatal errors makes it significantly more difficult to >debug, especially if you are debugging a non-connected handheld, >e.g., a Clie (which CW8 still wont talk to) or IR operations. Using >"fatal" screens is like highway patrolmen shooting out the car tires >rather than citing the driver for an illegal right-on-red. I'd >rather have access to a descriptive explanation of the problem. > --Steve
I'd like to submit a similar analogy that -- from my point of view, anyway -- is more accurate. It's like the highway patrolmen shooting out the tires of a speeding car rather than letting the driver drive over a cliff. By shooting out the tires, you can possibly save the driver and find out why he's driving like an idiot. If he goes over the cliff, you have no idea why he's down there. -- -- Keith Rollin -- Palm OS Emulator engineer -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
