Python 2.7 has reached end of support
and will be deprecated
on January 31, 2026. After deprecation, you won't be able to deploy Python 2.7
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Python
2.7 applications will continue to run and receive traffic after their deprecation date
. We recommend that
you migrate to the latest supported version of Python
.
Messages Module Exceptions
Stay organized with collections
Save and categorize content based on your preferences.
The protorpc.messages
package provides the following exception classes:
- class
DecodeError()
- Raised when there is an error decoding an encoded message.
- class
DefinitionNotFoundError()
- Raised when a definition is not found.
- class
DuplicateNumberError()
- Raised when a duplicate number is assigned to a field.
- class
EnumDefinitionError()
- Raised when there are errors in Enum definitions.
- class
FieldDefinitionError()
- Raised when there are errors in field definitions.
- class
InvalidDefaultError()
- Raised when an invalid default value is provided to a field.
- class
InvalidNumberError()
- Raised when an invalid number is provided to a field.
- class
InvalidVariantError()
- Raised when an invalid variant is provided to a field.
- class
MessageDefinitionError()
- Raised when there are errors in Message definitions.
- class
ValidationError()
- Raised when a message has an invalid value.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eprotorpc.messages\u003c/code\u003e package defines various exception classes for handling errors related to message encoding and decoding.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDefinitionNotFoundError\u003c/code\u003e is raised when a necessary definition is missing.\u003c/p\u003e\n"],["\u003cp\u003eMultiple exceptions exist for errors in defining messages, fields, and enums, including \u003ccode\u003eMessageDefinitionError\u003c/code\u003e, \u003ccode\u003eFieldDefinitionError\u003c/code\u003e, and \u003ccode\u003eEnumDefinitionError\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIssues with field numbers, default values, and variants raise \u003ccode\u003eDuplicateNumberError\u003c/code\u003e, \u003ccode\u003eInvalidDefaultError\u003c/code\u003e, and \u003ccode\u003eInvalidVariantError\u003c/code\u003e respectively.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eValidationError\u003c/code\u003e indicates that a message contains an invalid value.\u003c/p\u003e\n"]]],[],null,["# Messages Module Exceptions\n\nThe `protorpc.messages` package provides the following exception classes:\n\nclass DecodeError()\n: Raised when there is an error decoding an encoded message.\n\nclass DefinitionNotFoundError()\n: Raised when a definition is not found.\n\nclass DuplicateNumberError()\n: Raised when a duplicate number is assigned to a field.\n\nclass EnumDefinitionError()\n: Raised when there are errors in Enum definitions.\n\nclass FieldDefinitionError()\n: Raised when there are errors in field definitions.\n\nclass InvalidDefaultError()\n: Raised when an invalid default value is provided to a field.\n\nclass InvalidNumberError()\n: Raised when an invalid number is provided to a field.\n\nclass InvalidVariantError()\n: Raised when an invalid variant is provided to a field.\n\nclass MessageDefinitionError()\n: Raised when there are errors in Message definitions.\n\nclass ValidationError()\n: Raised when a message has an invalid value."]]