[interchange-cvs] interchange - racke modified scripts/expire.PL

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Sat Mar 30 07:19:01 2002


User:      racke
Date:      2002-03-30 12:18:31 GMT
Modified:  scripts  expire.PL
Log:
stop expiring if catalog configuration fails and add catalog name
to error message

Revision  Changes    Path
2.3       +8 -5      interchange/scripts/expire.PL


rev 2.3, prev_rev 2.2
Index: expire.PL
===================================================================
RCS file: /anon_cvs/repository/interchange/scripts/expire.PL,v
retrieving revision 2.2
retrieving revision 2.3
diff -u -r2.2 -r2.3
--- expire.PL	4 Feb 2002 07:41:39 -0000	2.2
+++ expire.PL	30 Mar 2002 12:18:31 -0000	2.3
@@ -50,9 +50,9 @@
 #
 # Interchange session expiration
 #
-# $Id: expire.PL,v 2.2 2002/02/04 07:41:39 kwalsh Exp $
+# $Id: expire.PL,v 2.3 2002/03/30 12:18:31 racke Exp $
 #
-# Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
+# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
 # This program was originally based on Vend 0.2 and 0.3
 # Copyright 1995-96 by Andrew M. Wilcox <awilcox@world.std.com>
@@ -234,12 +234,15 @@
 
 	$g = $Global::Catalog{$catalog};
 	chdir $g->{dir} or die "chdir to $g->{dir}: $!\n";
-	$Vend::Cfg = Vend::Config::config(
+	eval {$Vend::Cfg = Vend::Config::config(
 					$g->{name},
 					$g->{dir},
 					"$g->{dir}/etc",
 					$g->{base} || undef,
-					);
+					)};
+    if ($@) {
+        die "$0: Configuration for catalog $catalog failed: $@\n";
+    }
 }
 else {
 	$Vend::Cfg->{ScratchDir} = '/tmp';
@@ -301,7 +304,7 @@
 
 =head1 VERSION
 
-1.0
+1.1
 
 =head1 SYNOPSIS