Mercurial > pub > Impl
annotate Lib/IMPL/Test/FailException.pm @ 197:6b1dda998839
Added IMPL::declare, IMPL::require, to simplify module definitions
IMPL::Transform now admires object inheritance while searching for the transformation
Added HTTP some exceptions
IMPL::Web::Application::RestResource almost implemented
| author | sergey |
|---|---|
| date | Thu, 19 Apr 2012 02:10:02 +0400 |
| parents | 4267a2ac3d46 |
| children |
| rev | line source |
|---|---|
| 49 | 1 package IMPL::Test::FailException; |
| 2 use strict; | |
| 3 use warnings; | |
| 4 | |
| 166 | 5 use parent qw(IMPL::Exception); |
| 49 | 6 |
| 7 __PACKAGE__->PassThroughArgs; | |
| 8 | |
| 9 sub toString { | |
| 10 my $this = shift; | |
| 11 | |
| 12 $this->Message . join("\n",'',map IMPL::Exception::indent($_,1), @{$this->Args} ); | |
| 13 } | |
| 14 | |
| 15 sub save { | |
| 16 my ($this,$ctx) = @_; | |
| 17 | |
| 18 $ctx->AddVar(Message => $this->Message); | |
| 19 $ctx->AddVar(Args => $this->Args) if @{$this->Args}; | |
| 20 } | |
| 21 | |
| 22 1; |
