[interchange-cvs] interchange - racke modified lib/Vend/Table/Common.pm

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Wed Jan 1 09:55:01 2003


User:      racke
Date:      2003-01-01 14:54:09 GMT
Modified:  lib/Vend/Table Common.pm
Log:
unstuff_row now logs the database where the error occurs

Revision  Changes    Path
2.23      +5 -3      interchange/lib/Vend/Table/Common.pm


rev 2.23, prev_rev 2.22
Index: Common.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/Common.pm,v
retrieving revision 2.22
retrieving revision 2.23
diff -u -r2.22 -r2.23
--- Common.pm	12 Dec 2002 03:22:58 -0000	2.22
+++ Common.pm	1 Jan 2003 14:54:09 -0000	2.23
@@ -1,8 +1,9 @@
 # Vend::Table::Common - Common access methods for Interchange databases
 #
-# $Id: Common.pm,v 2.22 2002/12/12 03:22:58 mheins Exp $
+# $Id: Common.pm,v 2.23 2003/01/01 14:54:09 racke Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
+# Copyright (C) 2003 ICDEVGROUP <interchange@icdevgroup.org>
 #
 # This program was originally based on Vend 0.2 and 0.3
 # Copyright 1995 by Andrew M. Wilcox <amw@wilcoxsolutions.com>
@@ -22,7 +23,7 @@
 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA  02111-1307  USA.
 
-$VERSION = substr(q$Revision: 2.22 $, 10);
+$VERSION = substr(q$Revision: 2.23 $, 10);
 use strict;
 
 package Vend::Table::Common;
@@ -265,7 +266,8 @@
 sub unstuff_row {
     my ($s, $key) = @_;
     my $line = $s->[$TIE_HASH]{"k$key"};
-    die "There is no row with index '$key'" unless defined $line;
+    die "There is no row with index '$key' in database $s->[$FILENAME]"
+		unless defined $line;
     return map(unstuff($_), split(/\t/, $line, 9999))
 		unless $s->[$CONFIG]{FILTER_FROM};
 	my @f = map(unstuff($_), split(/\t/, $line, 9999));