Skip to content

Commit 2be5306

Browse files
committed
(S32/Exceptions) Add X::Range::InvalidArg exception.
1 parent 8efa3ac commit 2be5306

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

S32-setting-library/Exception.pod

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,17 @@ Thrown when an argument to C<Str.trans> is not a C<Pair>.
10451045
}
10461046
}
10471047

1048+
=head2 X::Range::InvalidArg
1049+
1050+
Thrown when an argument to C<Range.new> is a C<Range>.
1051+
1052+
my class X::Range::InvalidArg is Exception {
1053+
has $.got;
1054+
method message() {
1055+
"{$.got.^name} objects are not valid endpoints for Ranges";
1056+
}
1057+
}
1058+
10481059
=head2 X::Sequence::Deduction
10491060

10501061
Exception type when the C<...> sequence operator is being called without an

0 commit comments

Comments
 (0)