[interchange-cvs] interchange - heins modified lib/Vend/Interpolate.pm

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Thu Jul 4 02:12:22 2002


User:      heins
Date:      2002-07-04 06:11:49 GMT
Modified:  lib/Vend Interpolate.pm
Log:
* Improve error handling for [counter sql=3D"table:sequence"]

Revision  Changes    Path
2.78      +5 -3      interchange/lib/Vend/Interpolate.pm


rev 2.78, prev_rev 2.77
Index: Interpolate.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /anon_cvs/repository/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.77
retrieving revision 2.78
diff -u -r2.77 -r2.78
--- Interpolate.pm	4 Jul 2002 06:03:53 -0000	2.77
+++ Interpolate.pm	4 Jul 2002 06:11:47 -0000	2.78
@@ -1,6 +1,6 @@
 # Vend::Interpolate - Interpret Interchange tags
 #=20
-# $Id: Interpolate.pm,v 2.77 2002/07/04 06:03:53 mheins Exp $
+# $Id: Interpolate.pm,v 2.78 2002/07/04 06:11:47 mheins Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -27,7 +27,7 @@
 require Exporter;
 @ISA =3D qw(Exporter);
=20
-$VERSION =3D substr(q$Revision: 2.77 $, 10);
+$VERSION =3D substr(q$Revision: 2.78 $, 10);
=20
 @EXPORT =3D qw (
=20
@@ -2560,7 +2560,7 @@
 						$opt->{attr},
 					);
 		}
-		else {
+		elsif($db) {
 			$dbh =3D $db->dbh();
 			$dsn =3D $db->config('DSN');
 		}
@@ -2602,6 +2602,8 @@
 			}
=20
 		};
+
+		logOnce('error', $@) if $@;
=20
 		return $val if defined $val;
 	}