This repository has been archived by the owner on Oct 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Required delimiter is missing
Scott Smith edited this page Mar 17, 2018
·
6 revisions
This error message complains that the input doesn't specify the timezone offset. In reality, this is not necessarily illegal, such templates simply mean a (kind of careless) local time. But, presume that in this example, the timezone offset information is necessary.
The Timezone offset expression is missing from the end of the input:
1992-05-29?12:25:12.1
^X
Consider supplying 'Z', a minus timezone offset (example '-04:00'), or positive timezone offset (example '+07:00').
Name | Value | Type | Source |
---|---|---|---|
Input | 1992-05-29?12:25:12.1 | String |
The ISO8601 string being parsed |
Expected | 'Z', '+', or '-' | Char |
What the parse command is looking for |
Actual | Nothing |
Maybe |
What the parse found |
PreviousName | "fraction" | String |
The name of the field immediately preceding the erroneous delimiter |
PreviousValue | 1 | Int |
The value of the immediately preceding field |
PreviousType | digits | String |
"digits" |
PreviousStartOffset | 19 | Int |
The displacement from the start of the string being parsed to locate the leftmost '^' |
PreviousCharCount | 1 | Int |
The number of '^' chars to position under the previous value |
TopLine | "The ? is missing from ?:" | String |
This error category |
BottomLine | "A Z , + offset, or - offset belongs in that position." |
String |
This error category |
- The Value column above describes the example values in the sample error message above.
- The offset of the actual error position is calculated: it is always after the sum of the PreviousStartOffset and the PreviousCharCount.
- Here the number of 'X' is one. But Digit sequence has wrong length has no 'X' because the error field is the first one.
- Note that TopLine and BottomLine have '?' marking where values will be substituted.
- I'm wondering if the type of the preceding field can be automatically derived.