From d0ce6e3b8184e5135897558eef44058eed25e6c5 Mon Sep 17 00:00:00 2001 From: cramakri <cramakri> Date: Thu, 1 Nov 2012 12:17:23 +0000 Subject: [PATCH] Added abort on error to simplify development. SVN: 27446 --- openbis-ipad/openBIS/openBIS/CISDOBAppDelegate.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openbis-ipad/openBIS/openBIS/CISDOBAppDelegate.m b/openbis-ipad/openBIS/openBIS/CISDOBAppDelegate.m index a5707c2f623..856f25ef26b 100644 --- a/openbis-ipad/openBIS/openBIS/CISDOBAppDelegate.m +++ b/openbis-ipad/openBIS/openBIS/CISDOBAppDelegate.m @@ -117,7 +117,7 @@ if (managedObjectContext != nil) { if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) { // TODO Implement error handling - NSLog(@"Unresolved error %@, %@", error, [error userInfo]); + NSLog(@"Unresolved error -- could not save %@, %@", error, [error userInfo]); abort(); } } @@ -142,6 +142,12 @@ [[CISDOBIpadServiceManager alloc] initWithStoreUrl: storeUrl openbisUrl: openbisUrl trusted: YES error: &error]; + if (!_serviceManager) { + // TODO Implement error handling + NSLog(@"Unresolved error -- could not create service manager %@, %@", error, [error userInfo]); + abort(); + } + return _serviceManager; } -- GitLab