cvsuser     03/06/20 10:27:00

  Modified:    App-Repository/lib/App/Repository MySQL2.pm
  Log:
  catch exceptions and unlock
  
  Revision  Changes    Path
  1.6       +212 -207  p5ee/App-Repository/lib/App/Repository/MySQL2.pm
  
  Index: MySQL2.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/App-Repository/lib/App/Repository/MySQL2.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -r1.5 -r1.6
  --- MySQL2.pm 19 Jun 2003 17:18:05 -0000      1.5
  +++ MySQL2.pm 20 Jun 2003 17:27:00 -0000      1.6
  @@ -1,12 +1,12 @@
   
   ######################################################################
  -## File: $Id: MySQL2.pm,v 1.5 2003/06/19 17:18:05 spadkins Exp $
  +## File: $Id: MySQL2.pm,v 1.6 2003/06/20 17:27:00 spadkins Exp $
   ######################################################################
   
   use App::Repository::MySQL;
   
   package App::Repository::MySQL2;
  -$VERSION = do { my @r=(q$Revision: 1.5 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r};
  +$VERSION = do { my @r=(q$Revision: 1.6 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r};
   
   @ISA = ( "App::Repository::MySQL" );
   
  @@ -25,6 +25,7 @@
       $context = $self->{context};
   
       $self->_lock_table($table);
  +    eval {
       $tabledef = $self->{table}{$table};
       $table_ih = $tabledef->{table_ih} || "";
       $column_change_dttm = $tabledef->{column_change_dttm} || "";
  @@ -251,7 +252,11 @@
               last if (!$ok);
           }
       }
  -
  +    };
  +    if ($@) {
  +        $self->_unlock_table($table);
  +        die "Exception in store_rows(): $@";
  +    }
       $self->_unlock_table($table);
       $self->{numrows} = $nrows;
       &App::sub_exit($nrows) if ($App::trace_subs);
  
  
  

Reply via email to