File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ = begin pod
2
+
3
+ = TITLE class X::Str::Numeric
4
+
5
+ class X::Str::Numeric is Exception { }
6
+
7
+ Error thrown (or wrapped in a C < Failure > ) when a a conversion from string to
8
+ a number fails.
9
+
10
+ For example
11
+
12
+ say +"42 answers"
13
+
14
+ dies with
15
+
16
+ Cannot convert string to number: trailing characters after number in '42⏏ answers' (indicated by ⏏)
17
+
18
+ = head1 Methods
19
+
20
+ = head2 source
21
+
22
+ method source() returns Str:D
23
+
24
+ Returns the string that was attempted to convert to a number
25
+
26
+ = head2 pos
27
+
28
+ method pos() returns Int:D
29
+
30
+ Gives the position into the string where the parsing failed.
31
+
32
+ = head2 reason
33
+
34
+ method reason() returns Int:D
35
+
36
+ Verbal description of the reason why the conversion failed.
37
+
38
+ = end pod
You can’t perform that action at this time.
0 commit comments