The patch incorrectly masks the underlying issue - during the refactor
of
584ea6e4 a bunch of exception traps were introduced which were never
there in the first place. _dbh_get_info() should always be throwing an
error if one takes place (the only place before
584ea6e4 was in the
FreeTDS version determination, and that one made no sense anyway).
_server_info() OTOH is indeed an opportunistic routine - leave the
"rethrow if determining driver" escape as-is
bullshit
* a0361822 reenable the win32 test - if it no longer fails for anyone - how
will we ever fix it?
-* 461c7168 has two places where it sets a brand new lexical to undef. Please
-remove for the sanity of future maintainers (avoid the "why is this here?!")
* a48693f4 adds 5 files for a test that may even be the same as that from
571df676 - please rewrite using the existing schema and delete the rest
$info = {};
- my $server_version;
- try {
- $server_version = $self->_get_server_version;
- }
- catch {
- if ($self->{_in_determine_driver}) {
- $self->throw_exception($_);
- }
- $server_version = undef;
+ my $server_version = try {
+ $self->_get_server_version
+ } catch {
+ # driver determination *may* use this codepath
+ # in which case we must rethrow
+ $self->throw_exception($_) if $self->{_in_determine_driver};
+
+ # $server_version on failure
+ undef;
};
if (defined $server_version) {
unless defined $info;
}
- my $res;
-
- try {
- $res = $self->_get_dbh->get_info($info);
- }
- catch {
- if ($self->{_in_determine_driver}) {
- $self->throw_exception($_);
- }
- $res = undef;
- };
-
- return $res;
+ return $self->_get_dbh->get_info($info);
}
sub _describe_connection {
'insert returning capability guessed correctly'
);
+isa_ok (DBICTest::Schema->connect($dsn, $user, $pass)->storage->sql_maker, 'DBIx::Class::SQLMaker::Oracle');
+
+# see if determining a driver with bad credentials throws propely
+throws_ok {
+ DBICTest::Schema->connect($dsn, "BORKED BORKED USER $user", $pass)->storage->sql_maker;
+} qr/DBI Connection failed/;
+
##########
# the recyclebin (new for 10g) sometimes comes in the way
my $on_connect_sql = $v >= 10 ? ["ALTER SESSION SET recyclebin = OFF"] : [];