Skip to content

Commit

Permalink
document the one-arg-message form a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Jan 10, 2010
1 parent db74a37 commit 34aabc2
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/Throwable/Error.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,22 @@ with 'Throwable';
use Moose;
extends 'Throwable::Error';
has execution_phase => (is => 'ro', isa => 'MyApp::Phase');
has execution_phase => (
is => 'ro',
isa => 'MyApp::Phase',
default => 'startup',
);
...and in your app...
MyApp::Error->throw({ phase => $self->phase });
MyApp::Error->throw("all communications offline");
# or...
MyApp::Error->throw({
message => "all communications offline",
phase => 'shutdown',
});
=head1 DESCRIPTION
Expand Down

0 comments on commit 34aabc2

Please sign in to comment.