RuntimeException because it normally represents a programming error: it happens when some
code which constructs a message fails to set all the fields. parseFrom() methods do
not throw this; they throw an InvalidProtocolBufferException if required fields are
missing, because it is not a programming error to receive an incomplete message. In other words,
UninitializedMessageException should never be thrown by correct code, but InvalidProtocolBufferException might be.
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public InvalidProtocolBufferException | |
| private static String | buildDescription(final List<String> missingFields)
Construct the description string for this exception. |
| public List |
| missingFields | back to summary |
|---|---|
| private final List<String> missingFields | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| UninitializedMessageException | back to summary |
|---|---|
| public UninitializedMessageException(final MessageLite message) | |
| UninitializedMessageException | back to summary |
|---|---|
| public UninitializedMessageException(final List<String> missingFields) | |
| asInvalidProtocolBufferException | back to summary |
|---|---|
| public InvalidProtocolBufferException asInvalidProtocolBufferException() Converts this exception to an | |
| buildDescription | back to summary |
|---|---|
| private static String buildDescription(final List<String> missingFields) Construct the description string for this exception. | |
| getMissingFields | back to summary |
|---|---|
| public List Get a list of human-readable names of required fields missing from this message. Each name is a full path to a field, e.g. "foo.bar[5].baz". Returns null if the lite runtime was used, since it lacks the ability to find missing fields. | |