mirror of
https://github.com/status-im/react-native-udp.git
synced 2025-01-13 02:24:24 +00:00
fix typo in error message
This commit is contained in:
parent
41fc91c5cc
commit
9664cdf276
@ -127,7 +127,7 @@ NSString *const RCTUDPErrorDomain = @"RCTUDPErrorDomain";
|
|||||||
RCTResponseSenderBlock callback = [self getPendingSend:tagNum];
|
RCTResponseSenderBlock callback = [self getPendingSend:tagNum];
|
||||||
if (callback) {
|
if (callback) {
|
||||||
NSString *msg = error.localizedFailureReason ?: error.localizedDescription;
|
NSString *msg = error.localizedFailureReason ?: error.localizedDescription;
|
||||||
callback(@[msg ?: @"unkown error"]);
|
callback(@[msg ?: @"unknown error"]);
|
||||||
[self dropPendingSend:tagNum];
|
[self dropPendingSend:tagNum];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ RCT_EXPORT_METHOD(bind:(nonnull NSNumber*)cId
|
|||||||
if (![client bind:port address:address error:&error])
|
if (![client bind:port address:address error:&error])
|
||||||
{
|
{
|
||||||
NSString *msg = error.localizedFailureReason ?: error.localizedDescription;
|
NSString *msg = error.localizedFailureReason ?: error.localizedDescription;
|
||||||
callback(@[msg ?: @"unkown error when binding"]);
|
callback(@[msg ?: @"unknown error when binding"]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ RCT_EXPORT_METHOD(setBroadcast:(nonnull NSNumber*)cId
|
|||||||
if (![client setBroadcast:flag error:&error])
|
if (![client setBroadcast:flag error:&error])
|
||||||
{
|
{
|
||||||
NSString *msg = error.localizedFailureReason ?: error.localizedDescription;
|
NSString *msg = error.localizedFailureReason ?: error.localizedDescription;
|
||||||
callback(@[msg ?: @"unkown error when setBroadcast"]);
|
callback(@[msg ?: @"unknown error when setBroadcast"]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
callback(@[[NSNull null]]);
|
callback(@[[NSNull null]]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user