From 9326575c5c1ff67384dcc28eb37688547b8c96dc Mon Sep 17 00:00:00 2001 From: "Wenzel P. P. Peppmeyer" Date: Sun, 10 Sep 2017 13:57:35 +0200 Subject: [PATCH] doc Failure.new --- doc/Type/Failure.pod6 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/Type/Failure.pod6 b/doc/Type/Failure.pod6 index 3961d1cd1..244a0a411 100644 --- a/doc/Type/Failure.pod6 +++ b/doc/Type/Failure.pod6 @@ -24,6 +24,20 @@ failure to throw. =head1 Methods +=head mothod new + +Defined as: + method new(Failure:D: $payload --> Failure) + +Returns a new C instance with the given payload. The latter can be +either an C or a payload for an C. A typical payload +would be a C 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: