comparison Lib/IMPL/Exception.pm @ 278:4ddb27ff4a0b

core refactoring
author cin
date Mon, 04 Feb 2013 02:10:37 +0400
parents 5c82eec23bb6
children
comparison
equal deleted inserted replaced
277:6585464c4664 278:4ddb27ff4a0b
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;
15 14
16 BEGIN { 15 BEGIN {
17 __PACKAGE__->mk_accessors( qw(Message Args CallStack Source) ); 16 __PACKAGE__->mk_accessors( qw(Message Args CallStack Source) );
18 } 17 }
19 18
83 sub toString { 82 sub toString {
84 my ($this,$notrace) = @_; 83 my ($this,$notrace) = @_;
85 ($this->Message || ref $this) . join("\n",'',map { my $s = $_; local $_; indent("$s",1) } @{$this->Args} ) . ( $notrace ? '' : "\n" . $this->CallStack); 84 ($this->Message || ref $this) . join("\n",'',map { my $s = $_; local $_; indent("$s",1) } @{$this->Args} ) . ( $notrace ? '' : "\n" . $this->CallStack);
86 } 85 }
87 86
88 sub _PropertyImplementor {
89 'IMPL::Class::Property::Accessor'
90 }
91
92 package IMPL::InvalidOperationException; 87 package IMPL::InvalidOperationException;
93 our @ISA = qw(IMPL::Exception); 88 our @ISA = qw(IMPL::Exception);
94 __PACKAGE__->PassThroughArgs; 89 __PACKAGE__->PassThroughArgs;
95 90
96 package IMPL::InvalidArgumentException; 91 package IMPL::InvalidArgumentException;