fix typo in error message

This commit is contained in:
Andy Prock 2015-12-31 08:39:33 -08:00
parent 41fc91c5cc
commit 9664cdf276
2 changed files with 3 additions and 3 deletions

View File

@ -127,7 +127,7 @@ NSString *const RCTUDPErrorDomain = @"RCTUDPErrorDomain";
RCTResponseSenderBlock callback = [self getPendingSend:tagNum];
if (callback) {
NSString *msg = error.localizedFailureReason ?: error.localizedDescription;
callback(@[msg ?: @"unkown error"]);
callback(@[msg ?: @"unknown error"]);
[self dropPendingSend:tagNum];
}
}

View File

@ -62,7 +62,7 @@ RCT_EXPORT_METHOD(bind:(nonnull NSNumber*)cId
if (![client bind:port address:address error:&error])
{
NSString *msg = error.localizedFailureReason ?: error.localizedDescription;
callback(@[msg ?: @"unkown error when binding"]);
callback(@[msg ?: @"unknown error when binding"]);
return;
}
@ -98,7 +98,7 @@ RCT_EXPORT_METHOD(setBroadcast:(nonnull NSNumber*)cId
if (![client setBroadcast:flag error:&error])
{
NSString *msg = error.localizedFailureReason ?: error.localizedDescription;
callback(@[msg ?: @"unkown error when setBroadcast"]);
callback(@[msg ?: @"unknown error when setBroadcast"]);
return;
}
callback(@[[NSNull null]]);