aboutsummaryrefslogtreecommitdiffhomepage
path: root/objectivec/GPBMessage.h
diff options
context:
space:
mode:
Diffstat (limited to 'objectivec/GPBMessage.h')
-rw-r--r--objectivec/GPBMessage.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/objectivec/GPBMessage.h b/objectivec/GPBMessage.h
index 2249829f..b3b07793 100644
--- a/objectivec/GPBMessage.h
+++ b/objectivec/GPBMessage.h
@@ -49,12 +49,15 @@ extern NSString *const GPBMessageErrorDomain;
/// Error code for NSError with GPBMessageErrorDomain.
typedef NS_ENUM(NSInteger, GPBMessageErrorCode) {
- /// The data being parsed is bad and a message can not be created from it.
- GPBMessageErrorCodeMalformedData = -100,
+ /// Uncategorized error.
+ GPBMessageErrorCodeOther = -100,
/// A message can't be serialized because it is missing required fields.
GPBMessageErrorCodeMissingRequiredField = -101,
};
+/// Key under which the error's reason is stored inside the userInfo dictionary.
+extern NSString *const GPBErrorReasonKey;
+
CF_EXTERN_C_END
/// Base class for all of the generated message classes.
@@ -86,6 +89,9 @@ CF_EXTERN_C_END
/// @note In DEBUG builds, the parsed message is checked to be sure all required
/// fields were provided, and the parse will fail if some are missing.
///
+/// @note The errors returned are likely coming from the domain and codes listed
+/// at the top of this file and GPBCodedInputStream.h.
+///
/// @param data The data to parse.
/// @param errorPtr An optional error pointer to fill in with a failure reason if
/// the data can not be parsed.
@@ -101,6 +107,9 @@ CF_EXTERN_C_END
/// @note In DEBUG builds, the parsed message is checked to be sure all required
/// fields were provided, and the parse will fail if some are missing.
///
+/// @note The errors returned are likely coming from the domain and codes listed
+/// at the top of this file and GPBCodedInputStream.h.
+///
/// @param data The data to parse.
/// @param extensionRegistry The extension registry to use to look up extensions.
/// @param errorPtr An optional error pointer to fill in with a failure
@@ -119,6 +128,9 @@ CF_EXTERN_C_END
/// @note In DEBUG builds, the parsed message is checked to be sure all required
/// fields were provided, and the parse will fail if some are missing.
///
+/// @note The errors returned are likely coming from the domain and codes listed
+/// at the top of this file and GPBCodedInputStream.h.
+///
/// @param input The stream to read data from.
/// @param extensionRegistry The extension registry to use to look up extensions.
/// @param errorPtr An optional error pointer to fill in with a failure
@@ -139,6 +151,9 @@ CF_EXTERN_C_END
/// the required fields are set. So this method can be used to reload
/// messages that may not be complete.
///
+/// @note The errors returned are likely coming from the domain and codes listed
+/// at the top of this file and GPBCodedInputStream.h.
+///
/// @param input The stream to read data from.
/// @param extensionRegistry The extension registry to use to look up extensions.
/// @param errorPtr An optional error pointer to fill in with a failure
@@ -158,6 +173,9 @@ CF_EXTERN_C_END
/// @note In DEBUG builds, the parsed message is checked to be sure all required
/// fields were provided, and the parse will fail if some are missing.
///
+/// @note The errors returned are likely coming from the domain and codes listed
+/// at the top of this file and GPBCodedInputStream.h.
+///
/// @param data The data to parse.
/// @param errorPtr An optional error pointer to fill in with a failure reason if
/// the data can not be parsed.
@@ -171,6 +189,9 @@ CF_EXTERN_C_END
/// @note In DEBUG builds, the parsed message is checked to be sure all required
/// fields were provided, and the parse will fail if some are missing.
///
+/// @note The errors returned are likely coming from the domain and codes listed
+/// at the top of this file and GPBCodedInputStream.h.
+///
/// @param data The data to parse.
/// @param extensionRegistry The extension registry to use to look up extensions.
/// @param errorPtr An optional error pointer to fill in with a failure
@@ -188,6 +209,9 @@ CF_EXTERN_C_END
/// the required fields are set. So this method can be used to reload
/// messages that may not be complete.
///
+/// @note The errors returned are likely coming from the domain and codes listed
+/// at the top of this file and GPBCodedInputStream.h.
+///
/// @param input The stream to read data from.
/// @param extensionRegistry The extension registry to use to look up extensions.
/// @param errorPtr An optional error pointer to fill in with a failure