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
beaeaeda
Commit
beaeaeda
authored
May 29, 2019
by
Thomas Van Lenten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use runtime_error vs just exiting for some issues.
release notes: no
parent
37297b25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
conformance_objc.m
conformance/conformance_objc.m
+8
-3
No files found.
conformance/conformance_objc.m
View file @
beaeaeda
...
...
@@ -68,7 +68,8 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) {
switch
(
request
.
payloadOneOfCase
)
{
case
ConformanceRequest_Payload_OneOfCase_GPBUnsetOneOfCase
:
Die
(
@"Request didn't have a payload: %@"
,
request
);
response
.
runtimeError
=
[
NSString
stringWithFormat
:
@"Request didn't have a payload: %@"
,
request
];
break
;
case
ConformanceRequest_Payload_OneOfCase_ProtobufPayload
:
{
...
...
@@ -78,7 +79,10 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) {
}
else
if
([
request
.
messageType
isEqual
:
@"protobuf_test_messages.proto2.TestAllTypesProto2"
])
{
msgClass
=
[
TestAllTypesProto2
class
];
}
else
{
Die
(
@"Protobuf request had an unknown message_type: %@"
,
request
.
messageType
);
response
.
runtimeError
=
[
NSString
stringWithFormat
:
@"Protobuf request had an unknown message_type: %@"
,
request
.
messageType
];
break
;
}
NSError
*
error
=
nil
;
testMessage
=
[
msgClass
parseFromData
:
request
.
protobufPayload
error
:
&
error
];
...
...
@@ -108,7 +112,8 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) {
switch
(
request
.
requestedOutputFormat
)
{
case
WireFormat_GPBUnrecognizedEnumeratorValue
:
case
WireFormat_Unspecified
:
Die
(
@"Unrecognized/unspecified output format: %@"
,
request
);
response
.
runtimeError
=
[
NSString
stringWithFormat
:
@"Unrecognized/unspecified output format: %@"
,
request
];
break
;
case
WireFormat_Protobuf
:
...
...
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