Package com.google.protobuf
Class InvalidProtocolBufferException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.google.protobuf.InvalidProtocolBufferException
- All Implemented Interfaces:
Serializable
Thrown when a protocol message being parsed is invalid in some way,
e.g. it contains a malformed varint or a negative byte length.
- Author:
- kenton@google.com Kenton Varda
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the unfinished message attached to the exception, or null if no message is attached.setUnfinishedMessage(MessageLite unfinishedMessage) Attaches an unfinished message to the exception to support best-effort parsing inParserinterface.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidProtocolBufferException
-
-
Method Details
-
setUnfinishedMessage
Attaches an unfinished message to the exception to support best-effort parsing inParserinterface.- Returns:
- this
-
getUnfinishedMessage
Returns the unfinished message attached to the exception, or null if no message is attached.
-