Skip to content

Commit 2774606

Browse files
committed
[S32::Exception] better error message for X::Numeric::Real
also fix a typo
1 parent 5e47a16 commit 2774606

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

S32-setting-library/Exception.pod

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Authors of previous versions of this document:
1717

1818
Created: 26 Feb 2009
1919

20-
Last Modified: 22 August 2012
21-
Version: 22
20+
Last Modified: 23 August 2012
21+
Version: 23
2222

2323
The document is a draft.
2424

@@ -968,7 +968,7 @@ Thrown when hash assignment finds a trailing hash key with a value.
968968
method message() { "Odd number of elements found where hash expected" }
969969
}
970970

971-
=head2 X::Phaser::PrePos
971+
=head2 X::Phaser::PrePost
972972

973973
Thrown when the condition inside a C<PRE> or C<POST> phaser evaluate to a
974974
false value.
@@ -1251,11 +1251,12 @@ Occurs when an attempt to coerce a C<Numeric> to a C<Real>, C<Num>, C<Int> or
12511251
C<Rat> fails (due to a number with a nonzero imaginary part, for instance).
12521252

12531253
my class X::Numeric::Real is Exception {
1254+
has $.source;
12541255
has $.target;
12551256
has $.reason;
12561257

12571258
method message() {
1258-
"Can not convert Numeric to {$.target.^name}: $.reason";
1259+
"Can not convert $.source to {$.target.^name}: $.reason";
12591260
}
12601261
}
12611262

0 commit comments

Comments
 (0)