Adding error if file is not found.

This commit is contained in:
Tj 2015-08-27 13:42:16 -04:00
parent 7739371ad6
commit d07ce53bd2
1 changed files with 8 additions and 1 deletions

View File

@ -137,7 +137,14 @@ RCT_EXPORT_METHOD(pathForBundle:(NSString *)bundleNamed
[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