change ErrorHandler to Log
This commit is contained in:
parent
d11cd6f4f7
commit
199c4e4960
90 changed files with 311 additions and 311 deletions
|
|
@ -103,7 +103,7 @@ sub getAsset {
|
|||
my $assetUrl = shift;
|
||||
my $asset = eval{WebGUI::Asset->newByUrl($session,$assetUrl,$session->form->process("revision"))};
|
||||
if (Exception::Class->caught()) {
|
||||
$session->errorHandler->warn("Couldn't instantiate asset for url: ".$assetUrl." Root cause: ".$@);
|
||||
$session->log->warn("Couldn't instantiate asset for url: ".$assetUrl." Root cause: ".$@);
|
||||
}
|
||||
return $asset;
|
||||
}
|
||||
|
|
@ -163,9 +163,9 @@ The content handler for this package.
|
|||
|
||||
sub handler {
|
||||
my ($session) = @_;
|
||||
my ($errorHandler, $http, $var, $asset, $request, $config) = $session->quick(qw(errorHandler http var asset request config));
|
||||
my ($log, $http, $var, $asset, $request, $config) = $session->quick(qw(errorHandler http var asset request config));
|
||||
my $output = "";
|
||||
if (my $perfLog = $errorHandler->performanceLogger) { #show performance indicators if required
|
||||
if (my $perfLog = $log->performanceLogger) { #show performance indicators if required
|
||||
my $t = [Time::HiRes::gettimeofday()];
|
||||
$output = dispatch($session, getRequestedAssetUrl($session));
|
||||
$perfLog->({ time => Time::HiRes::tv_interval($t), type => 'Page' });
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ sub handler {
|
|||
$output = eval { $notFound->www_view };
|
||||
}
|
||||
else {
|
||||
$session->errorHandler->error("The notFound page could not be instanciated!");
|
||||
$session->log->error("The notFound page could not be instanciated!");
|
||||
$output = "An error was encountered while processing your request.";
|
||||
}
|
||||
$output = "An error was encountered while processing your request." if $output eq '';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue