| 1069 | } |
| 1070 | |
| 1071 | bool Reader::pushError(const Value& value, const JSONCPP_STRING& message) { |
| 1072 | ptrdiff_t const length = end_ - begin_; |
| 1073 | if(value.getOffsetStart() > length |
| 1074 | || value.getOffsetLimit() > length) |
| 1075 | return false; |
| 1076 | Token token; |
| 1077 | token.type_ = tokenError; |
| 1078 | token.start_ = begin_ + value.getOffsetStart(); |
| 1079 | token.end_ = end_ + value.getOffsetLimit(); |
| 1080 | ErrorInfo info; |
| 1081 | info.token_ = token; |
| 1082 | info.message_ = message; |
| 1083 | info.extra_ = 0; |
| 1084 | errors_.push_back(info); |
| 1085 | return true; |
| 1086 | } |
| 1087 | |
| 1088 | bool Reader::pushError(const Value& value, const JSONCPP_STRING& message, const Value& extra) { |
| 1089 | ptrdiff_t const length = end_ - begin_; |
nothing calls this directly
no test coverage detected