WebGUI 0.12.0 release
This commit is contained in:
parent
f0d80bbfb3
commit
597b9ff2b0
28 changed files with 344 additions and 122 deletions
|
|
@ -10,26 +10,30 @@ package ErrorHandler;
|
|||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use FileHandle;
|
||||
use WebGUI::Session;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
#sub fatalError {
|
||||
# my ($key);
|
||||
# print httpHeader();
|
||||
# print "<h1>WebGUI Fatal Error</h1>Something unexpected happened that caused this system to fault. Please send t
|
||||
his message to ";#.$session{setting}{adminEmail}."<p>";
|
||||
# print $0." at ".localtime(time)." reported:<br>";
|
||||
# print $_[0];
|
||||
# print "<p><h3>Caller</h3><table border=1><tr><td valign=top>";
|
||||
# print "<b>Level 1</b><br>".join("<br>",caller(1));
|
||||
# print "</td><td valign=top>"."<b>Level 2</b><br>".join("<br>",caller(2));
|
||||
# print "</td><td valign=top>"."<b>Level 3</b><br>".join("<br>",caller(3));
|
||||
# print "</td><td valign=top>"."<b>Level 4</b><br>".join("<br>",caller(4));
|
||||
# print "</td></tr></table><p><h3>Form Variables</h3>";
|
||||
# #foreach $key (keys %session(form}) {
|
||||
# # print $key." = ".$session{form}{$key}."<br>";
|
||||
# #}
|
||||
# exit;
|
||||
#}
|
||||
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 "<h1>WebGUI Fatal Error</h1>Something unexpected happened that caused this system to fault. Please send this message to ";#.$session{setting}{adminEmail}."<p>";
|
||||
print $0." at ".localtime(time)." reported:<br>";
|
||||
print $_[0];
|
||||
print "<p><h3>Caller</h3><table border=1><tr><td valign=top>";
|
||||
print "<b>Level 1</b><br>".join("<br>",caller(1));
|
||||
print "</td><td valign=top>"."<b>Level 2</b><br>".join("<br>",caller(2));
|
||||
print "</td><td valign=top>"."<b>Level 3</b><br>".join("<br>",caller(3));
|
||||
print "</td><td valign=top>"."<b>Level 4</b><br>".join("<br>",caller(4));
|
||||
print "</td></tr></table><p><h3>Form Variables</h3>";
|
||||
#foreach $key (keys %{$session(form}}) {
|
||||
# print $key." = ".$session{form}{$key}."<br>";
|
||||
#}
|
||||
$logfile->close();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue