Re: Connected Callback Errors Ignored

"David E. Wheeler" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
On Nov 15, 2013, at 10:24 AM, Tim Bunce <[email protected]> wrote:

> When the method call (which fired the callback) returns, the error
> recorded on the handle will trigger RaiseError etc.

Only on 1.630 and higher.

>> I *always* use RaiseError => 1 (or HandleError). Never ever check return values.
> 
> Ah, your use of HandleError adds an extra perspective on this.

Yeah, I have been defaulting to it for so long that I forget that some folks might not.

> Probably not. I think connect_cached is the only use of Callbacks in
> DBI.pm (not DBI.xs), and the very small added cost would only be paid by
> those using Callbacks anyway.

And only on connection or reconnection, yes? Not like for every call to do() or fetch()!

>> I can carve out a little time today to write some test cases if it’ll help.
> 
> No need, I've just hacked t/70callbacks.t to include those tests :)

Cool. Not pushed yet, I guess. Will watch for it!

Thanks!

David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.