Mercurial > pub > Impl
comparison Lib/IMPL/Exception.pm @ 232:5c82eec23bb6
Fixed degradations due refactoring
author | sergey |
---|---|
date | Tue, 09 Oct 2012 20:12:47 +0400 |
parents | 6d8092d8ce1b |
children | 4ddb27ff4a0b |
comparison
equal
deleted
inserted
replaced
231:ff1e8fa932f2 | 232:5c82eec23bb6 |
---|---|
9 BEGIN { | 9 BEGIN { |
10 require Error; | 10 require Error; |
11 } | 11 } |
12 | 12 |
13 use parent qw(IMPL::Object::Abstract Error Class::Accessor); | 13 use parent qw(IMPL::Object::Abstract Error Class::Accessor); |
14 require IMPL::Class::Property::Accessor; | |
14 | 15 |
15 BEGIN { | 16 BEGIN { |
16 __PACKAGE__->mk_accessors( qw(Message Args CallStack Source) ); | 17 __PACKAGE__->mk_accessors( qw(Message Args CallStack Source) ); |
17 } | 18 } |
18 | 19 |
82 sub toString { | 83 sub toString { |
83 my ($this,$notrace) = @_; | 84 my ($this,$notrace) = @_; |
84 ($this->Message || ref $this) . join("\n",'',map { my $s = $_; local $_; indent("$s",1) } @{$this->Args} ) . ( $notrace ? '' : "\n" . $this->CallStack); | 85 ($this->Message || ref $this) . join("\n",'',map { my $s = $_; local $_; indent("$s",1) } @{$this->Args} ) . ( $notrace ? '' : "\n" . $this->CallStack); |
85 } | 86 } |
86 | 87 |
88 sub _PropertyImplementor { | |
89 'IMPL::Class::Property::Accessor' | |
90 } | |
91 | |
87 package IMPL::InvalidOperationException; | 92 package IMPL::InvalidOperationException; |
88 our @ISA = qw(IMPL::Exception); | 93 our @ISA = qw(IMPL::Exception); |
89 __PACKAGE__->PassThroughArgs; | 94 __PACKAGE__->PassThroughArgs; |
90 | 95 |
91 package IMPL::InvalidArgumentException; | 96 package IMPL::InvalidArgumentException; |