Adding error if file is not found.
This commit is contained in:
parent
7739371ad6
commit
d07ce53bd2
|
@ -137,7 +137,14 @@ RCT_EXPORT_METHOD(pathForBundle:(NSString *)bundleNamed
|
||||||
[bundle load];
|
[bundle load];
|
||||||
}
|
}
|
||||||
|
|
||||||
callback(@[[NSNull null], path]);
|
if (path) {
|
||||||
|
callback(@[[NSNull null], path]);
|
||||||
|
} else {
|
||||||
|
callback(@[[NSError errorWithDomain:NSPOSIXErrorDomain
|
||||||
|
code:NSFileNoSuchFileError
|
||||||
|
userInfo:nil].localizedDescription,
|
||||||
|
[NSNull null]]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSNumber *)dateToTimeIntervalNumber:(NSDate *)date
|
- (NSNumber *)dateToTimeIntervalNumber:(NSDate *)date
|
||||||
|
|
Loading…
Reference in New Issue