IMHO Ė The amount of error processing really depend on where what and when.
If the program is a simple batch job that runs at 2:00am, can be re-run if it fails and the output wonít be used till 9:00am in the morning, then maybe you can scrimp a bit on the error handling/reporting (But I bet after a few years of frantic 2:00am phone calls, you might change your mind.).
If itís a heavily used data entry screen thatís expected to protect the integrity of a production system from invalid data , then Iíd do a bunch more error checking, input validation, and reporting in human readable format (Like ďZip Code must be in the format of NNNNN-NNNN).
If the system handles 80% of the crude oil transactions in America in a real time highly visible environment, or monitors the pressure of a 747ís flaps as they extend down for landing, or perhaps handles the collision avoidance subsystem of a robotically controlled blood analyzer as strings of small glass veils containing potentially contagious sample whirl byÖ. I donít think any amount of error handling/reporting is too much.
After 35 years of people wakening me up at 2:00am because a downstream job failed due to my program missing an opportunity to report bad (or just perhaps very unusual) data, youíll find that I put as much error catching/reporting code as possible into every program I write, and lots more into the critical ones.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||