From: Peter Rabbitson Date: Fri, 7 May 2010 08:15:48 +0000 (+0000) Subject: Failure to determine dbms version is *not* a fatal error - trap exceptions X-Git-Tag: v0.08122~82 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aab4dff30b24ed47e748889c40a2c49f95d0acf3;p=dbsrgits%2FDBIx-Class.git Failure to determine dbms version is *not* a fatal error - trap exceptions --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index ee0f70b..4214463 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1012,7 +1012,10 @@ sub _server_info { my %info; - my $server_version = $self->_get_server_version; + my $server_version = do { + local $@; # might be happenin in some sort of destructor + eval { $self->_get_server_version }; + }; if (defined $server_version) { $info{dbms_version} = $server_version; @@ -1044,7 +1047,7 @@ sub _server_info { } sub _get_server_version { - eval { shift->_get_dbh->get_info(18) }; + shift->_get_dbh->get_info(18); } sub _determine_driver {