MCPcopy Create free account
hub / github.com/apache/solr / err

Method err

solr/solrj/src/java/org/noggit/JSONParser.java:435–448  ·  view source on GitHub ↗
(String msg)

Source from the content-addressed store, hash-verified

433 }
434
435 protected ParseException err(String msg) {
436 // We can't tell if EOF was hit by comparing start<=end
437 // because the illegal char could have been the last in the buffer
438 // or in the stream. To deal with this, the "eof" var was introduced
439 if (!eof && start > 0) start--; // backup one char
440 String chs = "char=" + ((start >= end) ? "(EOF)" : "" + buf[start]);
441 String pos = "position=" + (gpos + start);
442 String tot = chs + ',' + pos + getContext();
443 if (msg == null) {
444 if (start >= end) msg = "Unexpected EOF";
445 else msg = "JSON Parse Error";
446 }
447 return new ParseException(msg + ": " + tot);
448 }
449
450 private String getContext() {
451 String context = "";

Callers 12

popMethod · 0.95
getMoreMethod · 0.95
getSlashCommentMethod · 0.95
matchBareWordMethod · 0.95
readExpMethod · 0.95
hexvalMethod · 0.95
readEscapedCharMethod · 0.95
nextMethod · 0.95
nextEventMethod · 0.95
goToMethod · 0.95
getNumberCharsMethod · 0.95

Calls 1

getContextMethod · 0.95

Tested by

no test coverage detected