summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2017-01-24 14:38:57 -0500
committerJoel Fischer <joeljfischer@gmail.com>2017-01-24 14:38:57 -0500
commit05a99a4e46c8d8201ecf380d6b7e4ab561b72fe2 (patch)
tree3213e80dec863354f2c0102f7c3f7c691038fb71
parentd19adbc482610889ee817199135813a50496187f (diff)
downloadsdl_ios-05a99a4e46c8d8201ecf380d6b7e4ab561b72fe2.tar.gz
Revert "Updated SDLManagerError enum to include a warning case."
This reverts commit d19adbc482610889ee817199135813a50496187f.
-rw-r--r--SmartDeviceLink/SDLError.h1
-rw-r--r--SmartDeviceLink/SDLError.m10
-rw-r--r--SmartDeviceLink/SDLErrorConstants.h4
-rw-r--r--SmartDeviceLink/SDLLifecycleManager.m2
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m2
5 files changed, 2 insertions, 17 deletions
diff --git a/SmartDeviceLink/SDLError.h b/SmartDeviceLink/SDLError.h
index 535769d07..7572adc9a 100644
--- a/SmartDeviceLink/SDLError.h
+++ b/SmartDeviceLink/SDLError.h
@@ -31,7 +31,6 @@ extern SDLErrorDomain *const SDLErrorDomainFileManager;
+ (NSError *)sdl_lifecycle_managersFailedToStart;
+ (NSError *)sdl_lifecycle_startedWithBadResult:(SDLResult *)result info:(NSString *)info;
+ (NSError *)sdl_lifecycle_failedWithBadResult:(SDLResult *)result info:(NSString *)info;
-+ (NSError *)sdl_lifecycle_failedWithWarningResult:(SDLResult *)result info:(NSString *)info;
#pragma mark SDLFileManager
diff --git a/SmartDeviceLink/SDLError.m b/SmartDeviceLink/SDLError.m
index e396c5039..07d28878b 100644
--- a/SmartDeviceLink/SDLError.m
+++ b/SmartDeviceLink/SDLError.m
@@ -94,16 +94,6 @@ SDLErrorDomain *const SDLErrorDomainFileManager = @"com.sdl.filemanager.error";
userInfo:userInfo];
}
-+ (NSError *)sdl_lifecycle_failedWithWarningResult:(SDLResult *)result info:(NSString *)info {
- NSDictionary *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(result.value, nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(info, nil)
- };
- return [NSError errorWithDomain:SDLErrorDomainLifecycleManager
- code:SDLManagerErrorRegistrationWarning
- userInfo:userInfo];
-}
-
#pragma mark SDLFileManager
diff --git a/SmartDeviceLink/SDLErrorConstants.h b/SmartDeviceLink/SDLErrorConstants.h
index 57d1c4fee..24d1d58f7 100644
--- a/SmartDeviceLink/SDLErrorConstants.h
+++ b/SmartDeviceLink/SDLErrorConstants.h
@@ -36,10 +36,6 @@ typedef NS_ENUM(NSInteger, SDLManagerError) {
* Registering with the remote system failed.
*/
SDLManagerErrorRegistrationFailed = -6,
- /**
- * Registering with the remote system was successful, but with a warning.
- */
- SDLManagerErrorRegistrationWarning = -7,
};
/**
diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m
index 7f4fc74d0..8f205afd4 100644
--- a/SmartDeviceLink/SDLLifecycleManager.m
+++ b/SmartDeviceLink/SDLLifecycleManager.m
@@ -252,7 +252,7 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
// If the resultCode isn't success, we got a warning. Errors were handled in `didEnterStateConnected`.
if (![registerResult isEqualToEnum:[SDLResult SUCCESS]]) {
- startError = [NSError sdl_lifecycle_failedWithWarningResult:registerResult info:registerInfo];
+ startError = [NSError sdl_lifecycle_startedWithBadResult:registerResult info:registerInfo];
}
// If we got to this point, we succeeded, send the error if there was a warning.
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m
index 77f6666a7..ba680de00 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m
@@ -288,7 +288,7 @@ describe(@"a lifecycle manager", ^{
expect(@(readyHandlerSuccess)).to(equal(@YES));
expect(readyHandlerError).toNot(beNil());
- expect(@(readyHandlerError.code)).to(equal(@(SDLManagerErrorRegistrationWarning)));
+ expect(@(readyHandlerError.code)).to(equal(@(SDLManagerErrorRegistrationFailed)));
expect(readyHandlerError.userInfo[NSLocalizedFailureReasonErrorKey]).to(match(response.info));
});
});