aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/ProtoRPC
diff options
context:
space:
mode:
authorGravatar Marc Wandschneider <marcwan@gmail.com>2015-05-27 12:48:24 -0700
committerGravatar Marc Wandschneider <marcwan@gmail.com>2015-05-27 12:48:24 -0700
commitf03d2668bce80abe5ce69f7c5f2c6d80d6b7cfb2 (patch)
tree2abb7cb18560c06667e411e0ef69aeab946f430a /src/objective-c/ProtoRPC
parent14390257d03d145654676bbd39a16e83dd3391c9 (diff)
Fix for changed parseFromData: signature (now parseFromData:error:)
Diffstat (limited to 'src/objective-c/ProtoRPC')
-rw-r--r--src/objective-c/ProtoRPC/ProtoRPC.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/objective-c/ProtoRPC/ProtoRPC.m b/src/objective-c/ProtoRPC/ProtoRPC.m
index 96608f2898..b8f8008422 100644
--- a/src/objective-c/ProtoRPC/ProtoRPC.m
+++ b/src/objective-c/ProtoRPC/ProtoRPC.m
@@ -59,7 +59,7 @@
responseClass:(Class)responseClass
responsesWriteable:(id<GRXWriteable>)responsesWriteable {
// Because we can't tell the type system to constrain the class, we need to check at runtime:
- if (![responseClass respondsToSelector:@selector(parseFromData:)]) {
+ if (![responseClass respondsToSelector:@selector(parseFromData:error:)]) {
[NSException raise:NSInvalidArgumentException
format:@"A protobuf class to parse the responses must be provided."];
}
@@ -71,7 +71,7 @@
if ((self = [super initWithHost:host method:method requestsWriter:bytesWriter])) {
// A writeable that parses the proto messages received.
_responseWriteable = [[GRXWriteable alloc] initWithValueHandler:^(NSData *value) {
- [responsesWriteable writeValue:[responseClass parseFromData:value]];
+ [responsesWriteable writeValue:[responseClass parseFromData:value error:NULL]];
} completionHandler:^(NSError *errorOrNil) {
[responsesWriteable writesFinishedWithError:errorOrNil];
}];