http://qs321.pair.com?node_id=183916


in reply to Re: Re: What Are The Rules For Subs And Modules When Fed Wrong Input
in thread What Are The Rules For Subs And Modules When Fed Wrong Input

If the DBI module threw useful exceptions when things went wrong, I would no longer have to sit there checking the return on every little operation to make sure things went ok. I could wrap my entire atomic operation in an eval {}, catch any exceptions I found relevant and re-start the entire operation or provide *useful* input to the user if necessary.
Strangely enough you can do that. It's just a matter of reading through the documentation (1.30 here, 1.19 here).

You can use the RaiseError, PrintError (and on later DBI versions) HandleError database handles to pull this off. If you download Tim Bunce's Advanced Perl DBI slides there is more information.

Hope this helps...

gav^