diff options
Diffstat (limited to 'src/ProtocolBuffers/UninitializedMessageException.cs')
-rw-r--r-- | src/ProtocolBuffers/UninitializedMessageException.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ProtocolBuffers/UninitializedMessageException.cs b/src/ProtocolBuffers/UninitializedMessageException.cs index d98987a1..12db07df 100644 --- a/src/ProtocolBuffers/UninitializedMessageException.cs +++ b/src/ProtocolBuffers/UninitializedMessageException.cs @@ -53,8 +53,6 @@ namespace Google.ProtocolBuffers { : base(BuildDescription(missingFields)) { this.missingFields = new List<string>(missingFields); } - - /// <summary> /// Returns a read-only list of human-readable names of /// required fields missing from this message. Each name @@ -90,6 +88,14 @@ namespace Google.ProtocolBuffers { return description.ToString(); } + /// <summary> + /// For Lite exceptions that do not known how to enumerate missing fields + /// </summary> + public UninitializedMessageException(IMessageLite message) + : base(String.Format("Message {0} is missing required fields", message.GetType())) { + missingFields = new List<string>(); + } + #if !LITE public UninitializedMessageException(IMessage message) : this(FindMissingFields(message)) { |