[Lxr-commits] CVS: lxr/lib/LXR Common.pm,1.39,1.40
Brought to you by:
ajlittoz
|
From: Malcolm B. <mb...@us...> - 2002-03-18 14:44:27
|
Update of /cvsroot/lxr/lxr/lib/LXR
In directory usw-pr-cvs1:/tmp/cvs-serv20680
Modified Files:
Common.pm
Log Message:
Check that a configuration is found, otherwise produce a fatal error
Index: Common.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Common.pm,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- Common.pm 26 Feb 2002 16:07:06 -0000 1.39
+++ Common.pm 18 Mar 2002 14:44:23 -0000 1.40
@@ -446,6 +446,7 @@
}
if ($HTTP->{'param'}->{'raw'}) {
+ #FIXME - need more types here
my %type = ('gif' => 'image/gif',
'html' => 'text/html');
@@ -518,9 +519,12 @@
$identifier = $HTTP->{'param'}->{'i'};
$config = new LXR::Config($HTTP->{'this_url'});
+ die "Can't find config for ".$HTTP->{'this_url'} if !defined($config);
$files = new LXR::Files($config->sourceroot);
+ die "Can't create Files for ".$config->sourceroot if !defined($files);
$index = new LXR::Index($config->dbname);
-
+ die "Can't create Index for ".$config->dbname if !defined($index);
+
foreach ($config->allvariables) {
$config->variable($_, $HTTP->{'param'}->{$_}) if $HTTP->{'param'}->{$_};
}
|