Mercurial > pub > Impl
changeset 402:b79081b70a7a
fixed error handler templates env
author | cin |
---|---|
date | Mon, 19 May 2014 18:33:52 +0400 |
parents | 16ff604298c7 |
children | 7171a8e2e2ba |
files | Lib/IMPL/Web/Handler/ErrorHandler.pm |
diffstat | 1 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Lib/IMPL/Web/Handler/ErrorHandler.pm Thu May 15 18:24:28 2014 +0400 +++ b/Lib/IMPL/Web/Handler/ErrorHandler.pm Mon May 19 18:33:52 2014 +0400 @@ -8,7 +8,8 @@ WebException => 'IMPL::Web::Exception', ArgumentException => '-IMPL::InvalidArgumentException', IOException => '-IMPL::IOException', - HttpResponse => 'IMPL::Web::HttpResponse' + HttpResponse => 'IMPL::Web::HttpResponse', + Security => 'IMPL::Security' }, base => { 'IMPL::Object' => undef, @@ -45,7 +46,16 @@ if (my $err = $@) { my $vars = { - error => $err + error => $err, + result => $result, + request => sub { $action }, + app => $action->application, + location => $action->context->{resourceLocation}, + resource => $action->context->{resource}, + document => {}, + session => sub { Security->context }, + user => sub { Security->principal }, + security => sub { $action->security } }; my $status = "500 Internal Server Error";