IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16551


Ignore:
Timestamp:
Feb 19, 2008, 3:55:58 PM (18 years ago)
Author:
eugene
Message:

clarified error message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080219/PS-IPP-Config/lib/PS/IPP/Config.pm

    r16542 r16551  
    11# Copyright (c) 2006  Paul Price, Joshua Hoblitt
    22#
    3 # $Id: Config.pm,v 1.75.2.1 2008-02-19 20:09:09 eugene Exp $
     3# $Id: Config.pm,v 1.75.2.2 2008-02-20 01:55:58 eugene Exp $
    44
    55package PS::IPP::Config;
     
    9696    bless $self, $class;
    9797
    98     print "load site\n";
    9998    $self->load_site();
    100 
    101     print "load system\n";
    10299    $self->load_system();
    103100
     
    154151
    155152    my $i = 0;
    156     print "$i"; $i ++;
    157153
    158154    unless (defined $self) {
     
    160156        exit($PS_EXIT_PROG_ERROR);
    161157    }
    162     print "$i"; $i ++;
    163158
    164159    my $filename = metadataLookupStr($self->{_userConfig}, 'SITE'); # Site config file
     
    167162        exit($PS_EXIT_CONFIG_ERROR);
    168163    }
    169     print "$i"; $i ++;
    170164
    171165    my $realfile = $self->_find_config($filename); # Resolved filename, after hunting the PATH
    172     print "$i"; $i ++;
    173166
    174167    # Read the file
     
    178171        exit($PS_EXIT_CONFIG_ERROR);
    179172    }
    180     print "$i"; $i ++;
    181173
    182174    my @contents = <$file>;
    183175    close $file;
    184176    $self->{_siteConfig} = $parser->parse( join '', @contents); # The parsed metadata config
    185     print "$i"; $i ++;
    186 
    187     ## XXXX : the error is here
     177
    188178    unless (defined $self->{_siteConfig}) {
    189         carp "Failure to define site configuration";
    190         exit($PS_EXIT_CONFIG_ERROR);
    191     }
    192     print "$i"; $i ++;
    193 
    194     # XXX why isn't just $self being returned here? -JH
     179        carp "Failure to parse the site configuration file $realfile";
     180        exit($PS_EXIT_CONFIG_ERROR);
     181    }
     182
    195183    return $self;
    196184}
Note: See TracChangeset for help on using the changeset viewer.