package ErrorHandler; #------------------------------------------------------------------- # WebGUI is Copyright 2001 Plain Black Software. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using # this software. #------------------------------------------------------------------- # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- use FileHandle; use WebGUI::Session; #------------------------------------------------------------------- sub fatalError { my ($key, $logfile); print Session::httpHeader(); $logfile = FileHandle->new(">".$session{config}{logfile}) or die "Can't open log file."; print $logfile localtime(time); print "

WebGUI Fatal Error

Something unexpected happened that caused this system to fault. Please send this message to ";#.$session{setting}{adminEmail}."

"; print $0." at ".localtime(time)." reported:
"; print $_[0]; print "

Caller

"; print "Level 1
".join("
",caller(1)); print "
"."Level 2
".join("
",caller(2)); print "
"."Level 3
".join("
",caller(3)); print "
"."Level 4
".join("
",caller(4)); print "

Form Variables

"; #foreach $key (keys %{$session(form}}) { # print $key." = ".$session{form}{$key}."
"; #} $logfile->close(); exit; }