[Lxr-commits] CVS: lxr/lib/LXR Common.pm,1.37,1.38 Config.pm,1.25,1.26
Brought to you by:
ajlittoz
|
From: Malcolm B. <mb...@us...> - 2002-02-26 15:59:35
|
Update of /cvsroot/lxr/lxr/lib/LXR
In directory usw-pr-cvs1:/tmp/cvs-serv23323/lib/LXR
Modified Files:
Common.pm Config.pm
Log Message:
Check that a configuration has been found, die with error if not.
Add dump of current config to the error log when fatal() called
Index: Common.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Common.pm,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- Common.pm 18 Nov 2001 03:31:34 -0000 1.37
+++ Common.pm 26 Feb 2002 15:59:32 -0000 1.38
@@ -67,6 +67,7 @@
my $c = join(", line ", (caller)[0,2]);
print(STDERR "[",scalar(localtime),"] fatal: $c: $_[0]\n");
print(STDERR '[@INC ', join(" ", @INC), ' $0 ', $0, "\n");
+ print(STDERR '$config', join(" ", %$config), "\n");
print("<h4 align=\"center\"><i>** Fatal: $_[0]</i></h4>\n") if $wwwdebug;
exit(1);
}
@@ -175,6 +176,7 @@
if(!defined($t)) {
return(undef);
}
+
$t =~ s/\+/ /g;
$t =~ s/\%([\da-f][\da-f])/pack("C", hex($1))/gie;
Index: Config.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Config.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- Config.pm 15 Aug 2001 15:50:27 -0000 1.25
+++ Config.pm 26 Feb 2002 15:59:32 -0000 1.26
@@ -92,6 +92,8 @@
%$self = (%$self, %$config);
}
+
+ die "Can't find config for $url\n" if !defined $$self{baseurl};
}
|