在Java中发生异常java.time.format.DateTimeParseException
意味着字符串解析为日期格式失败。
在调用java.time.Duration#parse方法时抛出:
- Text cannot be parsed to a Duration: overflow,表示数值溢出
- Text cannot be parsed to a Duration,表示传入的字符串不能被解析为Duration对象
在调用java.time.Duration#parse方法时抛出:
- Text cannot be parsed to a Period,表示传入的字符串不能被解析为
Period
对象
在调用java.time.format.DateTimeFormatter#parse(java.lang.CharSequence)方法时抛出:
- Text xxx could not be parsed at index xxx
- Text xxx could not be parsed, unparsed text found at index xxx