Guard against exceptions in _describe_connection
Peter Rabbitson [Thu, 28 Feb 2013 09:02:56 +0000 (10:02 +0100)]
Stuff like this happens otherwise:
http://lists.scsys.co.uk/pipermail/dbix-class/2013-January/011085.html

lib/DBIx/Class/Storage/DBI.pm

index 527c2fb..0a60e73 100644 (file)
@@ -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} );