comparison Lib/IMPL/Web/Handler/ErrorHandler.pm @ 233:3cebcf6fdb9b

refactoring, cleaning code
author sergey
date Thu, 11 Oct 2012 04:53:08 +0400
parents 6d8092d8ce1b
children 32aceba4ee6d
comparison
equal deleted inserted replaced
232:5c82eec23bb6 233:3cebcf6fdb9b
1 package IMPL::Web::Handler::ErrorHandler; 1 package IMPL::Web::Handler::ErrorHandler;
2 use strict; 2 use strict;
3 3
4 use IMPL::lang qw(:declare :constants is); 4 use IMPL::Const qw(:prop);
5 use IMPL::Exception(); 5 use IMPL::Exception();
6 use IMPL::declare { 6 use IMPL::declare {
7 require => { 7 require => {
8 WebException => 'IMPL::Web::Exception', 8 WebException => 'IMPL::Web::Exception',
9 ArgumentException => '-IMPL::InvalidArgumentException', 9 ArgumentException => '-IMPL::InvalidArgumentException',
12 }, 12 },
13 base => { 13 base => {
14 'IMPL::Object' => undef, 14 'IMPL::Object' => undef,
15 'IMPL::Object::Autofill' => '@_', 15 'IMPL::Object::Autofill' => '@_',
16 'IMPL::Object::Serializable' => undef 16 'IMPL::Object::Serializable' => undef
17 } 17 },
18 props => [
19 errors => PROP_RW,
20 loader => PROP_RW,
21 fallback => PROP_RW,
22 contentType => PROP_RW
23 ]
18 }; 24 };
19
20 BEGIN {
21 public property errors => PROP_ALL;
22 public property loader => PROP_ALL;
23 public property fallback => PROP_ALL;
24 public property contentType => PROP_ALL;
25 }
26 25
27 sub CTOR { 26 sub CTOR {
28 my ($this) = @_; 27 my ($this) = @_;
29 28
30 die ArgumentException->new("loader") unless $this->loader; 29 die ArgumentException->new("loader") unless $this->loader;