dragonchild has asked for the wisdom of the Perl Monks concerning the following question:

I'm writing my own DBD driver that will not be going up on CPAN (internal to $work) and I patterned it quite heavily after DBD::Mock which I co-maintain. In DBD::Mock, $h->set_err() will properly die when RaiseError is set to true. However, in my DBD, it doesn't do that. $dbh->errstr and $DBI::errstr are both set properly, but it doesn't die. This is everywhere, but I'm testing it in the db::commit() method, so it should be recognized by DBI's _install_method(). I've tried every single variation I can think of, but nothing seems to get it to die properly.

Has anyone ever run into this?


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re: set_err not dying with RaiseError on
by Anonymous Monk on Apr 30, 2008 at 04:56 UTC
    What DBI version? Does PrintError work? Try $h->DBI::set_err?