From: Peter Rabbitson Date: Thu, 28 Feb 2013 09:02:56 +0000 (+0100) Subject: Guard against exceptions in _describe_connection X-Git-Tag: v0.08209~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=57596d95a893bc0a7eadf271bd16044bd78746d5;p=dbsrgits%2FDBIx-Class.git Guard against exceptions in _describe_connection Stuff like this happens otherwise: http://lists.scsys.co.uk/pipermail/dbix-class/2013-January/011085.html --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 527c2fb..0a60e73 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1181,7 +1181,9 @@ sub _describe_connection { SQL_TXN_ISOLATION_OPTION / ) { - my $v = $self->_dbh_get_info($inf); + # some drivers barf on things they do not know about instead + # of returning undef + my $v = try { $self->_dbh_get_info($inf) }; next unless defined $v; #my $key = sprintf( '%s(%s)', $inf, $DBI::Const::GetInfoType::GetInfoType{$inf} );