aboutsummaryrefslogtreecommitdiffhomepage
path: root/conformance
diff options
context:
space:
mode:
Diffstat (limited to 'conformance')
-rw-r--r--conformance/conformance_objc.m14
1 files changed, 6 insertions, 8 deletions
diff --git a/conformance/conformance_objc.m b/conformance/conformance_objc.m
index 6023fc78..84a43811 100644
--- a/conformance/conformance_objc.m
+++ b/conformance/conformance_objc.m
@@ -78,15 +78,13 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) {
} else if ([request.messageType isEqual:@"protobuf_test_messages.proto2.TestAllTypesProto2"]) {
msgClass = [TestAllTypesProto2 class];
} else {
- Die(@"Protobuf request doesn't have specific payload type");
+ Die(@"Protobuf request had an unknown message_type: %@", request.messageType);
}
- if (msgClass) {
- NSError *error = nil;
- testMessage = [msgClass parseFromData:request.protobufPayload error:&error];
- if (!testMessage) {
- response.parseError =
- [NSString stringWithFormat:@"Parse error: %@", error];
- }
+ NSError *error = nil;
+ testMessage = [msgClass parseFromData:request.protobufPayload error:&error];
+ if (!testMessage) {
+ response.parseError =
+ [NSString stringWithFormat:@"Parse error: %@", error];
}
break;
}