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 "
";
print $0." at ".localtime(time)." reported:
";
print $_[0];
print "
| ";
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 " |