Exception TextFormat.UnknownFieldParseException (3.19.4)

public static class TextFormat.UnknownFieldParseException extends TextFormat.ParseException

Thrown when encountering an unknown field while parsing a text format message.

Constructors

UnknownFieldParseException(int line, int column, String unknownField, String message)

public UnknownFieldParseException(int line, int column, String unknownField, String message)

Create a new instance

Parameters
NameDescription
lineint

the line number where the parse error occurred, using 1-offset.

columnint

the column number where the parser error occurred, using 1-offset.

unknownFieldString

the name of the unknown field found while parsing.

messageString

UnknownFieldParseException(String message)

public UnknownFieldParseException(String message)

Create a new instance, with -1 as the line and column numbers, and an empty unknown field name.

Parameter
NameDescription
messageString

Methods

getUnknownField()

public String getUnknownField()

Return the name of the unknown field encountered while parsing the protocol buffer string.

Returns
TypeDescription
String