private @NotNull VcsException unexpectedTextEndException(int start) {
    start = boundToText(start);

    int firstWindowStart = boundToText(start - 10);
    int firstWindowEnd = boundToText(start + 10);
    int secondWindowStart = boundToText(myText.length() - 10);
    int secondWindowEnd = boundToText(myText.length());
    String context;
    if (secondWindowEnd - firstWindowStart < 50) {
      context = myText.substring(firstWindowStart, start) + "<!>" + myText.substring(start, secondWindowEnd);
    }
    else {
      context = myText.substring(firstWindowStart, start) + "<!>" + myText.substring(start, firstWindowEnd) + "..." +
                myText.substring(secondWindowStart, secondWindowEnd);
    }
    return new VcsException(GitBundle.message("output.parse.exception.unexpected.end.message", context));
  }
private @NotNull VcsException unexpectedTextEndException(int start)