Permalink
Browse files

stop expiring if catalog configuration fails and add catalog name

to error message
  • Loading branch information...
1 parent cd40489 commit 4fe179633026768e3cbe2f74bd2abab65f2def26 @racke racke committed Mar 30, 2002
Showing with 8 additions and 5 deletions.
  1. +8 −5 scripts/expire.PL
View
@@ -50,9 +50,9 @@ DOIT: {
#
# 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 @@ if(defined $catalog) {
$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 @@ expire -- expire Interchange session files and databases
=head1 VERSION
-1.0
+1.1
=head1 SYNOPSIS

0 comments on commit 4fe1796

Please sign in to comment.