getting closer to bucket output
This commit is contained in:
parent
deb6b353d6
commit
268947c1d5
8 changed files with 192 additions and 42 deletions
|
|
@ -172,7 +172,7 @@ sub error {
|
|||
my $self = shift;
|
||||
my $message = shift;
|
||||
$self->getLogger->error($message);
|
||||
print("\n\n".$message.":\n".$self->getStackTrace());
|
||||
$self->session->output->print("\n\n".$message.":\n".$self->getStackTrace());
|
||||
$self->getLogger->debug("Stack trace for ERROR ".$message."\n".$self->getStackTrace());
|
||||
$self->session->stow->set("debug_error", $self->session->stow->get("debug_error").$message."\n");
|
||||
}
|
||||
|
|
@ -193,19 +193,19 @@ sub fatal {
|
|||
Apache2::RequestUtil->request->content_type('text/html') if ($self->session->request);
|
||||
$self->getLogger->fatal($message);
|
||||
$self->getLogger->debug("Stack trace for FATAL ".$message."\n".$self->getStackTrace());
|
||||
print $self->session->http->getHeader if ($self->session->request);
|
||||
$self->session->output->print($self->session->http->getHeader) if ($self->session->request);
|
||||
unless ($self->canShowDebug()) {
|
||||
#NOTE: You can't internationalize this because with some types of errors that would cause an infinite loop.
|
||||
print "<h1>Problem With Request</h1>
|
||||
$self->session->output->print("<h1>Problem With Request</h1>
|
||||
We have encountered a problem with your request. Please use your back button and try again.
|
||||
If this problem persists, please contact us with what you were trying to do and the time and date of the problem.";
|
||||
print '<br />'.$self->session->setting("companyName");
|
||||
print '<br />'.$self->session->setting("companyEmail");
|
||||
print '<br />'.$self->session->setting("companyURL");
|
||||
If this problem persists, please contact us with what you were trying to do and the time and date of the problem.");
|
||||
$self->session->output->print('<br />'.$self->session->setting("companyName"));
|
||||
$self->session->output->print('<br />'.$self->session->setting("companyEmail"));
|
||||
$self->session->output->print('<br />'.$self->session->setting("companyURL"));
|
||||
} else {
|
||||
print "<h1>WebGUI Fatal Error</h1><p>Something unexpected happened that caused this system to fault.</p>\n";
|
||||
print "<p>".$message."</p>\n";
|
||||
print $self->showDebug();
|
||||
$self->session->output->print("<h1>WebGUI Fatal Error</h1><p>Something unexpected happened that caused this system to fault.</p>\n");
|
||||
$self->session->output->print("<p>".$message."</p>\n");
|
||||
$self->session->output->print($self->showDebug());
|
||||
}
|
||||
$self->session->close();
|
||||
die $message;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue