final ParseErrorDetails renderError() {
    final int errorIndex = toIndex(currentErrorAt);
    final String encounteredName = getEncountered();
    final ArrayList<String> errorStrings = Lists.arrayList(errors.size());
    for (Object error : errors) {
      errorStrings.add(String.valueOf(error));
    }
    switch (currentErrorType) {
    case UNEXPECTED :
      return new EmptyParseError(errorIndex, encounteredName) {
        @Override public String getUnexpected() {
          return errorStrings.get(0);
        }
      };
    case FAILURE :
      return new EmptyParseError(errorIndex, encounteredName) {
        @Override public String getFailureMessage() {
          return errorStrings.get(0);
        }
      };
    case EXPECTING:
    case MISSING:
    case DELIMITING:
      return new EmptyParseError(errorIndex, encounteredName) {
        @Override public List<String> getExpected() {
          return errorStrings;
        }
      };
    default:
      return new EmptyParseError(errorIndex, encounteredName);
    }
  }
final ParseErrorDetails renderError ( ) { final int errorIndex = toIndex ( currentErrorAt ) ; final String encounteredName = getEncountered ( ) ; final ArrayList < String > errorStrings = Lists . arrayList ( errors . size ( ) ) ; for ( Object error : errors ) { errorStrings . add ( String . valueOf ( error ) ) ; } switch ( currentErrorType ) { case UNEXPECTED : return new EmptyParseError ( errorIndex , encounteredName ) { @ Override public String getUnexpected ( ) { return errorStrings . get ( 0 ) ; } } ; case FAILURE : return new EmptyParseError ( errorIndex , encounteredName ) { @ Override public String getFailureMessage ( ) { return errorStrings . get ( 0 ) ; } } ; case EXPECTING : case MISSING : case DELIMITING : return new EmptyParseError ( errorIndex , encounteredName ) { @ Override public List < String > getExpected ( ) { return errorStrings ; } } ; default : return new EmptyParseError ( errorIndex , encounteredName ) ; } }
Only called when rendering the error in {@link ParserException}.