From d11bcb456c523a7d03f944fd305fc1aecf6c5343 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 31 Jul 2002 04:03:35 +0000 Subject: [PATCH] Added better explaination when the log file cannot be opened. --- lib/WebGUI/ErrorHandler.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/ErrorHandler.pm b/lib/WebGUI/ErrorHandler.pm index ecf91d60f..8cf11131f 100644 --- a/lib/WebGUI/ErrorHandler.pm +++ b/lib/WebGUI/ErrorHandler.pm @@ -33,7 +33,9 @@ sub fatalError { $logfile = $config->param('logfile'); } print "

WebGUI Fatal Error

Something unexpected happened that caused this system to fault.

" unless ($friendly); - $log = FileHandle->new(">>$logfile") or print "Can't open log file."; + $log = FileHandle->new(">>$logfile") or print "Can't open log file: ".$logfile + ."\n

Check your WebGUI configuration file to set the path of the log file, + and check to be sure the web server has the privileges to write to the log file."; print $0." at ".localtime(time)." reported:
" unless ($friendly); print $log localtime(time)." ".$0." FATAL: ".$_[0]."\n"; print $_[0] unless ($friendly);