| 813 | } |
| 814 | |
| 815 | bool Reader::pushError(const Value& value, const String& message) { |
| 816 | ptrdiff_t const length = end_ - begin_; |
| 817 | if (value.getOffsetStart() > length || value.getOffsetLimit() > length) |
| 818 | return false; |
| 819 | Token token; |
| 820 | token.type_ = tokenError; |
| 821 | token.start_ = begin_ + value.getOffsetStart(); |
| 822 | token.end_ = begin_ + value.getOffsetLimit(); |
| 823 | ErrorInfo info; |
| 824 | info.token_ = token; |
| 825 | info.message_ = message; |
| 826 | info.extra_ = nullptr; |
| 827 | errors_.push_back(info); |
| 828 | return true; |
| 829 | } |
| 830 | |
| 831 | bool Reader::pushError(const Value& value, const String& message, |
| 832 | const Value& extra) { |
nothing calls this directly
no test coverage detected