webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | List of all members
com.google.protobuf.UninitializedMessageException Class Reference
Inheritance diagram for com.google.protobuf.UninitializedMessageException:

Public Member Functions

 UninitializedMessageException (final MessageLite message)
 
 UninitializedMessageException (final List< String > missingFields)
 
List< String > getMissingFields ()
 
InvalidProtocolBufferException asInvalidProtocolBufferException ()
 

Detailed Description

Thrown when attempting to build a protocol message that is missing required fields. This is a

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,

should never be thrown by correct code, but

InvalidProtocolBufferException

might be.

Author
kento.nosp@m.n@go.nosp@m.ogle..nosp@m.com Kenton Varda

Constructor & Destructor Documentation

◆ UninitializedMessageException() [1/2]

com.google.protobuf.UninitializedMessageException.UninitializedMessageException ( final MessageLite  message)
inline

◆ UninitializedMessageException() [2/2]

com.google.protobuf.UninitializedMessageException.UninitializedMessageException ( final List< String >  missingFields)
inline

Member Function Documentation

◆ asInvalidProtocolBufferException()

InvalidProtocolBufferException com.google.protobuf.UninitializedMessageException.asInvalidProtocolBufferException ( )
inline

Converts this exception to an InvalidProtocolBufferException. When a parsed message is missing required fields, this should be thrown instead of

.

◆ getMissingFields()

List<String> com.google.protobuf.UninitializedMessageException.getMissingFields ( )
inline

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.


The documentation for this class was generated from the following file: