Skip to content

Commit

Permalink
doc Failure.new
Browse files Browse the repository at this point in the history
  • Loading branch information
gfldex committed Sep 10, 2017
1 parent 1a74aea commit 9326575
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doc/Type/Failure.pod6
Expand Up @@ -24,6 +24,20 @@ failure to throw.
=head1 Methods
=head mothod new
Defined as:
method new(Failure:D: $payload --> Failure)
Returns a new C<Failure> instance with the given payload. The latter can be
either an C<Exception> or a payload for an C<Exception>. A typical payload
would be a C<Str> with an error message. A list of payloads is also excepted.
my $e = Failure.new(now.DateTime, 'WELP‼');
say $e;
CATCH{ default { say .^name, ': ', .Str } }
# OUTPUT: «X::AdHoc: 2017-09-10T11:56:05.477237ZWELP‼␤»
=head2 method handled
Defined as:
Expand Down

0 comments on commit 9326575

Please sign in to comment.