aboutsummaryrefslogtreecommitdiff
path: root/src/protobuf/wkt/source_context_pb.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/protobuf/wkt/source_context_pb.nim')
-rw-r--r--src/protobuf/wkt/source_context_pb.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/protobuf/wkt/source_context_pb.nim b/src/protobuf/wkt/source_context_pb.nim
index f12ac25..382927c 100644
--- a/src/protobuf/wkt/source_context_pb.nim
+++ b/src/protobuf/wkt/source_context_pb.nim
@@ -57,7 +57,10 @@ proc readgoogle_protobuf_SourceContext*(stream: ProtobufStream): google_protobuf
tag = readTag(stream)
wireType = getTagWireType(tag)
case getTagFieldNumber(tag)
+ of 0:
+ raise newException(InvalidFieldNumberError, "Invalid field number: 0")
of 1:
+ expectWireType(wireType, WireType.LengthDelimited)
setfile_name(result, readString(stream))
else: skipField(stream, wireType)