Skip to content
Snippets Groups Projects
Commit 94ca4b34 authored by cramakri's avatar cramakri
Browse files

BIS-159 SP-395 : Fix complaints from semantic analyzer

SVN: 27831
parent c9d30f3c
No related branches found
No related tags found
No related merge requests found
...@@ -63,7 +63,10 @@ ...@@ -63,7 +63,10 @@
- (void)verifyLoginURL:(NSURL *)openbisUrl username:(NSString *)username password:(NSString *)password sender:(CISDOBLoginViewController *)controller - (void)verifyLoginURL:(NSURL *)openbisUrl username:(NSString *)username password:(NSString *)password sender:(CISDOBLoginViewController *)controller
{ {
NSError *error; NSError *error;
[self initializeServiceManager: openbisUrl error: &error]; if (![self initializeServiceManager: openbisUrl error: &error]) {
[controller showError: error];
return;
}
CISDOBMasterViewController *masterViewController = [self masterViewController]; CISDOBMasterViewController *masterViewController = [self masterViewController];
...@@ -203,8 +206,7 @@ ...@@ -203,8 +206,7 @@
NSURL *openbisUrl = [self openbisUrl]; NSURL *openbisUrl = [self openbisUrl];
NSError *error; NSError *error;
[self initializeServiceManager: openbisUrl error: &error]; if (![self initializeServiceManager: openbisUrl error: &error]) {
if (!_serviceManager) {
// TODO Implement error handling // TODO Implement error handling
NSLog(@"Unresolved error -- could not create service manager %@, %@", error, [error userInfo]); NSLog(@"Unresolved error -- could not create service manager %@, %@", error, [error userInfo]);
abort(); abort();
...@@ -213,7 +215,7 @@ ...@@ -213,7 +215,7 @@
return _serviceManager; return _serviceManager;
} }
- (void)initializeServiceManager:(NSURL *)openbisUrl error:(NSError **)error - (BOOL)initializeServiceManager:(NSURL *)openbisUrl error:(NSError **)error
{ {
NSURL *storeUrl = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"openBISData.sqlite"]; NSURL *storeUrl = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"openBISData.sqlite"];
...@@ -229,7 +231,10 @@ ...@@ -229,7 +231,10 @@
_serviceManager = _serviceManager =
[[CISDOBIpadServiceManager alloc] [[CISDOBIpadServiceManager alloc]
initWithStoreUrl: storeUrl openbisUrl: openbisUrl trusted: YES error: error]; initWithStoreUrl: storeUrl openbisUrl: openbisUrl trusted: YES error: error];
if (!_serviceManager) return NO;
} }
return YES;
} }
- (CISDOBOpenBisModel *)rootOpenBisModel - (CISDOBOpenBisModel *)rootOpenBisModel
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment