}
]);
- var callArgs = {
- uri: args.uri
- };
-
var callback = function(result) {
if (native_.isFailure(result)) {
native_.callIfPossible(args.errorCallback, native_.getErrorObject(result));
}
};
- native_.call('ExifManager_getExifInfo', callArgs, callback);
+ // TODO: Check if uri is correct (invalid characters)
+ // It could be done by file.resolve(uri), but at now is not implemented.
+ tizen.filesystem.resolve(args.uri,
+ function() {
+ native_.call('ExifManager_getExifInfo', {'uri': args.uri}, callback);
+ },
+ function() {
+ native_.callIfPossible(args.errorCallback, new tizen.WebAPIException(
+ tizen.WebAPIException.NOT_FOUND_ERR,
+ 'File can not be found.'));
+ });
};
ExifManager.prototype.saveExifInfo = function() {
}
};
+ // TODO: check args.exifInfo.uri
native_.call('ExifManager_saveExifInfo', json, callback);
};
}
};
+ // TODO: Check if uri is correct (invalid characters)
+ // It could be done by file.resolve(uri), but at now is not implemented.
tizen.filesystem.resolve(args.uri,
function() {
native_.call('ExifManager_getThumbnail', {'uri': args.uri}, _callback);
},
set: function(v) {
if (!type_.isUndefined(v)) {
- if (v === null || v instanceof Date) gpsTime_ = v;
+ if (v === null || v instanceof Date || v instanceof tizen.TZDate) gpsTime_ = v;
}
}
},
exif_data = exif_data_new_from_file(file_path.c_str());
if (!exif_data) {
- LoggerE("Thumbnail can not be loaded from path (%s)",
- file_path.c_str());
- throw common::InvalidValuesException("File can not be loaded");
+ LoggerE("Error reading from file [%s]", file_path.c_str());
+ throw common::UnknownException("Error reading from file");
}
if (exif_data->data && exif_data->size) {
ExifData* ed = exif_data_new_from_file(file_path.c_str());
if (!ed) {
LoggerE("Error reading exif from file %s", file_path.c_str());
- throw common::NotFoundException("Error reading exif from file");
+ throw common::UnknownException("Error reading exif from file");
}
LoggerD("loadFromURI_into_json exif_data_foreach_content START");