Connected Callback Errors Ignored

"David E. Wheeler" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
DBIers,

Given this script:

    use v5.18;
    use warnings;
    use utf8;
    use DBI;

    my $dbh = DBI->connect('dbi:SQLite:', '', '', {
        PrintError => 0,
        RaiseError => 1,
        AutoCommit => 1,
        Callbacks         => {
            connected => sub {
                say 'connected';
                $_[0]->do('SELECT 1 from foo');
                return;
            },
        }
    });

    say 'go';
    $dbh->do('SELECT 1 from foo');

The output is:

    connected
    go
    DBD::SQLite::db do failed: no such table: foo at /Users/david/bin/try line 22.

That doesn't seem right to me. Shouldn't the connected callback throw an exception? IOW, I would not expect "go" to be output.

Best,

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.