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

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Mon Apr 1 06:52:01 2002


User:      racke
Date:      2002-04-01 11:51:34 GMT
Modified:  scripts  Tag: STABLE_4_8-branch expire.PL
Log:
merged changes 2.2 vs 2.3
+++ 2.3 +++
stop expiring if catalog configuration fails and add catalog name
to error message

Revision  Changes    Path
No                   revision



No                   revision



2.0.2.2   +7 -4      interchange/scripts/expire.PL


rev 2.0.2.2, prev_rev 2.0.2.1
Index: expire.PL
===================================================================
RCS file: /anon_cvs/repository/interchange/scripts/expire.PL,v
retrieving revision 2.0.2.1
retrieving revision 2.0.2.2
diff -u -r2.0.2.1 -r2.0.2.2
--- expire.PL	24 Jan 2002 05:07:04 -0000	2.0.2.1
+++ expire.PL	1 Apr 2002 11:51:34 -0000	2.0.2.2
@@ -50,7 +50,7 @@
 #
 # Interchange session expiration
 #
-# $Id: expire.PL,v 2.0.2.1 2002/01/24 05:07:04 jon Exp $
+# $Id: expire.PL,v 2.0.2.2 2002/04/01 11:51:34 racke Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -228,12 +228,15 @@
 	global_config();
 	$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';
@@ -294,7 +297,7 @@
 
 =head1 VERSION
 
-1.0
+1.1
 
 =head1 SYNOPSIS