| 855 | } |
| 856 | |
| 857 | bool Reader::pushError(const Value& value, const JSONCPP_STRING& message) { |
| 858 | ptrdiff_t const length = end_ - begin_; |
| 859 | if(value.getOffsetStart() > length |
| 860 | || value.getOffsetLimit() > length) |
| 861 | return false; |
| 862 | Token token; |
| 863 | token.type_ = tokenError; |
| 864 | token.start_ = begin_ + value.getOffsetStart(); |
| 865 | token.end_ = end_ + value.getOffsetLimit(); |
| 866 | ErrorInfo info; |
| 867 | info.token_ = token; |
| 868 | info.message_ = message; |
| 869 | info.extra_ = 0; |
| 870 | errors_.push_back(info); |
| 871 | return true; |
| 872 | } |
| 873 | |
| 874 | bool Reader::pushError(const Value& value, const JSONCPP_STRING& message, const Value& extra) { |
| 875 | ptrdiff_t const length = end_ - begin_; |
nothing calls this directly
no test coverage detected