Fix a forgotten nested try::tiny usage
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI.pm
index cd2da9e..c7f0ec8 100644 (file)
@@ -1849,15 +1849,14 @@ sub _dbh_execute_inserts_with_no_binds {
   }
   catch {
     $err = shift;
+  };
+
+  # Make sure statement is finished even if there was an exception.
+  try {
+    $sth->finish
   }
-  finally {
-    # Make sure statement is finished even if there was an exception.
-    try {
-      $sth->finish
-    }
-    catch {
-      $err = shift unless defined $err;
-    };
+  catch {
+    $err = shift unless defined $err;
   };
 
   $self->throw_exception($err) if defined $err;