Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
3caf9fd0
Commit
3caf9fd0
authored
Jul 26, 2017
by
Thomas Van Lenten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Review feedback.
- Better error message for unknown messageType. - Remove unneeded if.
parent
c2831a34
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
conformance_objc.m
conformance/conformance_objc.m
+6
-8
No files found.
conformance/conformance_objc.m
View file @
3caf9fd0
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment