/** * Converts this exception to an {@link InvalidProtocolBufferException}. * When a parsed message is missing required fields, this should be thrown * instead of {@code UninitializedMessageException}. */ public InvalidProtocolBufferException asInvalidProtocolBufferException() { return new InvalidProtocolBufferException(getMessage()); }