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