I find this really useful in debugging scripts that do a lot of data processing. It can stop those embarassing problems when you are trying to sell your client's products for undef dollars :)
In an processing script, I output the unique id of each item as it is processed, then if (when) it dies it's just a matter of digging through the database or input files to find out what's wrong with that item.
I've always considered it better to have my script die and then try to fix the data rather than having a 'robust' script that outputs gibberish in boundary cases.
Hope this helps somebody.
|Replies are listed 'Best First'.|
Re: debugging trick of the week: fatal warnings
by perrin (Chancellor) on Apr 26, 2002 at 02:52 UTC
by stephen (Priest) on Apr 26, 2002 at 03:40 UTC