summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihail Vyrko <mvyrko@qulix.com>2019-04-05 09:13:48 +0300
committerMihail Vyrko <mvyrko@qulix.com>2019-04-05 09:13:48 +0300
commitdaf146880ddf6f1646d058f51886a89ce4b36008 (patch)
tree554e65c0b8df6b122f0e4eccc2ddfb2604652c25
parent064456a01240be70d66ca899ceeab50265a28d5a (diff)
downloadsdl_ios-daf146880ddf6f1646d058f51886a89ce4b36008.tar.gz
return error for mandatory parameters
-rw-r--r--SmartDeviceLink/SDLAppServiceCapability.m3
-rw-r--r--SmartDeviceLink/SDLAppServiceData.m6
-rw-r--r--SmartDeviceLink/SDLAppServiceManifest.m3
-rw-r--r--SmartDeviceLink/SDLAppServiceRecord.m12
-rw-r--r--SmartDeviceLink/SDLCloudAppProperties.m3
-rw-r--r--SmartDeviceLink/SDLGetAppServiceData.m3
-rw-r--r--SmartDeviceLink/SDLGetCloudAppProperties.m3
-rw-r--r--SmartDeviceLink/SDLGetFile.m3
-rw-r--r--SmartDeviceLink/SDLOnAppServiceData.m3
-rw-r--r--SmartDeviceLink/SDLOnSystemCapabilityUpdated.m3
-rw-r--r--SmartDeviceLink/SDLPerformAppServiceInteraction.m9
-rw-r--r--SmartDeviceLink/SDLPublishAppService.m3
-rw-r--r--SmartDeviceLink/SDLSetCloudAppProperties.m3
-rw-r--r--SmartDeviceLink/SDLWeatherServiceData.m3
14 files changed, 40 insertions, 20 deletions
diff --git a/SmartDeviceLink/SDLAppServiceCapability.m b/SmartDeviceLink/SDLAppServiceCapability.m
index 1dd6bb209..19e30d607 100644
--- a/SmartDeviceLink/SDLAppServiceCapability.m
+++ b/SmartDeviceLink/SDLAppServiceCapability.m
@@ -52,7 +52,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (SDLAppServiceRecord *)updatedAppServiceRecord {
- return [store sdl_objectForName:SDLRPCParameterNameUpdatedAppServiceRecord ofClass:SDLAppServiceRecord.class error:nil];
+ NSError *error = nil;
+ return [store sdl_objectForName:SDLRPCParameterNameUpdatedAppServiceRecord ofClass:SDLAppServiceRecord.class error:&error];
}
@end
diff --git a/SmartDeviceLink/SDLAppServiceData.m b/SmartDeviceLink/SDLAppServiceData.m
index a81f4707e..5381211c5 100644
--- a/SmartDeviceLink/SDLAppServiceData.m
+++ b/SmartDeviceLink/SDLAppServiceData.m
@@ -82,7 +82,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (NSString *)serviceType {
- return [store sdl_objectForName:SDLRPCParameterNameServiceType ofClass:NSString.class error:nil];
+ NSError *error = nil;
+ return [store sdl_objectForName:SDLRPCParameterNameServiceType ofClass:NSString.class error:&error];
}
- (void)setServiceId:(NSString *)serviceId {
@@ -90,7 +91,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (NSString *)serviceId {
- return [store sdl_objectForName:SDLRPCParameterNameServiceID ofClass:NSString.class error:nil];
+ NSError *error = nil;
+ return [store sdl_objectForName:SDLRPCParameterNameServiceID ofClass:NSString.class error:&error];
}
- (void)setWeatherServiceData:(nullable SDLWeatherServiceData *)weatherServiceData {
diff --git a/SmartDeviceLink/SDLAppServiceManifest.m b/SmartDeviceLink/SDLAppServiceManifest.m
index 5861052e9..ce6c827a7 100644
--- a/SmartDeviceLink/SDLAppServiceManifest.m
+++ b/SmartDeviceLink/SDLAppServiceManifest.m
@@ -75,7 +75,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (NSString *)serviceType {
- return [store sdl_objectForName:SDLRPCParameterNameServiceType ofClass:NSString.class error:nil];
+ NSError *error = nil;
+ return [store sdl_objectForName:SDLRPCParameterNameServiceType ofClass:NSString.class error:&error];
}
- (void)setServiceIcon:(nullable SDLImage *)serviceIcon {
diff --git a/SmartDeviceLink/SDLAppServiceRecord.m b/SmartDeviceLink/SDLAppServiceRecord.m
index 2ad7eb1d0..5677d6776 100644
--- a/SmartDeviceLink/SDLAppServiceRecord.m
+++ b/SmartDeviceLink/SDLAppServiceRecord.m
@@ -35,7 +35,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (NSString *)serviceID {
- return [store sdl_objectForName:SDLRPCParameterNameServiceID ofClass:NSString.class error:nil];
+ NSError *error = nil;
+ return [store sdl_objectForName:SDLRPCParameterNameServiceID ofClass:NSString.class error:&error];
}
- (void)setServiceManifest:(SDLAppServiceManifest *)serviceManifest {
@@ -43,7 +44,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (SDLAppServiceManifest *)serviceManifest {
- return [store sdl_objectForName:SDLRPCParameterNameServiceManifest ofClass:SDLAppServiceManifest.class error:nil];
+ NSError *error = nil;
+ return [store sdl_objectForName:SDLRPCParameterNameServiceManifest ofClass:SDLAppServiceManifest.class error:&error];
}
- (void)setServicePublished:(NSNumber<SDLBool> *)servicePublished {
@@ -51,7 +53,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (NSNumber<SDLBool> *)servicePublished {
- return [store sdl_objectForName:SDLRPCParameterNameServicePublished ofClass:NSNumber.class error:nil];
+ NSError *error = nil;
+ return [store sdl_objectForName:SDLRPCParameterNameServicePublished ofClass:NSNumber.class error:&error];
}
- (void)setServiceActive:(NSNumber<SDLBool> *)serviceActive {
@@ -59,7 +62,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (NSNumber<SDLBool> *)serviceActive {
- return [store sdl_objectForName:SDLRPCParameterNameServiceActive ofClass:NSNumber.class error:nil];
+ NSError *error = nil;
+ return [store sdl_objectForName:SDLRPCParameterNameServiceActive ofClass:NSNumber.class error:&error];
}
@end
diff --git a/SmartDeviceLink/SDLCloudAppProperties.m b/SmartDeviceLink/SDLCloudAppProperties.m
index dc5bef8e5..389ab0144 100644
--- a/SmartDeviceLink/SDLCloudAppProperties.m
+++ b/SmartDeviceLink/SDLCloudAppProperties.m
@@ -56,7 +56,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (NSString *)appID {
- return [store sdl_objectForName:SDLRPCParameterNameAppId ofClass:NSString.class error:nil];
+ NSError *error = nil;
+ return [store sdl_objectForName:SDLRPCParameterNameAppId ofClass:NSString.class error:&error];
}
- (void)setEnabled:(nullable NSNumber<SDLBool> *)enabled {
diff --git a/SmartDeviceLink/SDLGetAppServiceData.m b/SmartDeviceLink/SDLGetAppServiceData.m
index d804eb4ed..d8fb73e65 100644
--- a/SmartDeviceLink/SDLGetAppServiceData.m
+++ b/SmartDeviceLink/SDLGetAppServiceData.m
@@ -57,7 +57,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (NSString *)serviceType {
- return [parameters sdl_objectForName:SDLRPCParameterNameServiceType ofClass:NSString.class error:nil];
+ NSError *error = nil;
+ return [parameters sdl_objectForName:SDLRPCParameterNameServiceType ofClass:NSString.class error:&error];
}
- (void)setSubscribe:(nullable NSNumber<SDLBool> *)subscribe {
diff --git a/SmartDeviceLink/SDLGetCloudAppProperties.m b/SmartDeviceLink/SDLGetCloudAppProperties.m
index b6e47850a..c6ab76e5c 100644
--- a/SmartDeviceLink/SDLGetCloudAppProperties.m
+++ b/SmartDeviceLink/SDLGetCloudAppProperties.m
@@ -38,7 +38,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (NSString *)appID {
- return [parameters sdl_objectForName:SDLRPCParameterNameAppId ofClass:NSString.class error:nil];
+ NSError *error = nil;
+ return [parameters sdl_objectForName:SDLRPCParameterNameAppId ofClass:NSString.class error:&error];
}
@end
diff --git a/SmartDeviceLink/SDLGetFile.m b/SmartDeviceLink/SDLGetFile.m
index d581a369c..3bd11d2e9 100644
--- a/SmartDeviceLink/SDLGetFile.m
+++ b/SmartDeviceLink/SDLGetFile.m
@@ -63,7 +63,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (NSString *)fileName {
- return [parameters sdl_objectForName:SDLRPCParameterNameFilename ofClass:NSString.class error:nil];
+ NSError *error = nil;
+ return [parameters sdl_objectForName:SDLRPCParameterNameFilename ofClass:NSString.class error:&error];
}
- (void)setAppServiceId:(nullable NSString *)appServiceId {
diff --git a/SmartDeviceLink/SDLOnAppServiceData.m b/SmartDeviceLink/SDLOnAppServiceData.m
index e185710c4..c532ff4ea 100644
--- a/SmartDeviceLink/SDLOnAppServiceData.m
+++ b/SmartDeviceLink/SDLOnAppServiceData.m
@@ -39,7 +39,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (SDLAppServiceData *)serviceData {
- return [parameters sdl_objectForName:SDLRPCParameterNameServiceData ofClass:SDLAppServiceData.class error:nil];
+ NSError *error = nil;
+ return [parameters sdl_objectForName:SDLRPCParameterNameServiceData ofClass:SDLAppServiceData.class error:&error];
}
@end
diff --git a/SmartDeviceLink/SDLOnSystemCapabilityUpdated.m b/SmartDeviceLink/SDLOnSystemCapabilityUpdated.m
index 7bab5992c..f9809e12d 100644
--- a/SmartDeviceLink/SDLOnSystemCapabilityUpdated.m
+++ b/SmartDeviceLink/SDLOnSystemCapabilityUpdated.m
@@ -39,7 +39,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (SDLSystemCapability *)systemCapability {
- return [parameters sdl_objectForName:SDLRPCParameterNameSystemCapability ofClass:SDLSystemCapability.class error:nil];
+ NSError *error = nil;
+ return [parameters sdl_objectForName:SDLRPCParameterNameSystemCapability ofClass:SDLSystemCapability.class error:&error];
}
@end
diff --git a/SmartDeviceLink/SDLPerformAppServiceInteraction.m b/SmartDeviceLink/SDLPerformAppServiceInteraction.m
index 5dc136c85..292ae39b4 100644
--- a/SmartDeviceLink/SDLPerformAppServiceInteraction.m
+++ b/SmartDeviceLink/SDLPerformAppServiceInteraction.m
@@ -52,7 +52,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (NSString *)serviceUri {
- return [parameters sdl_objectForName:SDLRPCParameterNameServiceUri ofClass:NSString.class error:nil];
+ NSError *error = nil;
+ return [parameters sdl_objectForName:SDLRPCParameterNameServiceUri ofClass:NSString.class error:&error];
}
- (void)setServiceID:(NSString *)serviceID {
@@ -60,7 +61,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (NSString *)serviceID {
- return [parameters sdl_objectForName:SDLRPCParameterNameServiceID ofClass:NSString.class error:nil];
+ NSError *error = nil;
+ return [parameters sdl_objectForName:SDLRPCParameterNameServiceID ofClass:NSString.class error:&error];
}
- (void)setOriginApp:(NSString *)originApp {
@@ -68,7 +70,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (NSString *)originApp {
- return [parameters sdl_objectForName:SDLRPCParameterNameOriginApp ofClass:NSString.class error:nil];
+ NSError *error = nil;
+ return [parameters sdl_objectForName:SDLRPCParameterNameOriginApp ofClass:NSString.class error:&error];
}
- (void)setRequestServiceActive:(nullable NSNumber<SDLBool> *)requestServiceActive {
diff --git a/SmartDeviceLink/SDLPublishAppService.m b/SmartDeviceLink/SDLPublishAppService.m
index aaf10799f..de365af41 100644
--- a/SmartDeviceLink/SDLPublishAppService.m
+++ b/SmartDeviceLink/SDLPublishAppService.m
@@ -40,7 +40,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (SDLAppServiceManifest *)appServiceManifest {
- return [parameters sdl_objectForName:SDLRPCParameterNameAppServiceManifest ofClass:SDLAppServiceManifest.class error:nil];
+ NSError *error = nil;
+ return [parameters sdl_objectForName:SDLRPCParameterNameAppServiceManifest ofClass:SDLAppServiceManifest.class error:&error];
}
@end
diff --git a/SmartDeviceLink/SDLSetCloudAppProperties.m b/SmartDeviceLink/SDLSetCloudAppProperties.m
index d2878a8fe..bab40d749 100644
--- a/SmartDeviceLink/SDLSetCloudAppProperties.m
+++ b/SmartDeviceLink/SDLSetCloudAppProperties.m
@@ -40,7 +40,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (SDLCloudAppProperties *)properties {
- return [parameters sdl_objectForName:SDLRPCParameterNameProperties ofClass:SDLCloudAppProperties.class error:nil];
+ NSError *error = nil;
+ return [parameters sdl_objectForName:SDLRPCParameterNameProperties ofClass:SDLCloudAppProperties.class error:&error];
}
@end
diff --git a/SmartDeviceLink/SDLWeatherServiceData.m b/SmartDeviceLink/SDLWeatherServiceData.m
index 5763221be..59ed81be3 100644
--- a/SmartDeviceLink/SDLWeatherServiceData.m
+++ b/SmartDeviceLink/SDLWeatherServiceData.m
@@ -46,7 +46,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (SDLLocationDetails *)location {
- return [store sdl_objectForName:SDLRPCParameterNameLocation ofClass:SDLLocationDetails.class error:nil];
+ NSError *error = nil;
+ return [store sdl_objectForName:SDLRPCParameterNameLocation ofClass:SDLLocationDetails.class error:&error];
}
- (void)setCurrentForecast:(nullable SDLWeatherData *)currentForecast {