revise the error checking code to be more informative
Authored by: tmh 2003-08-11
Parent: [r450]
Child: [r452]