diff options
Diffstat (limited to 'SmartDeviceLink/private/SDLError.m')
-rw-r--r-- | SmartDeviceLink/private/SDLError.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/SmartDeviceLink/private/SDLError.m b/SmartDeviceLink/private/SDLError.m index a1dc6b52d..0bbd94f21 100644 --- a/SmartDeviceLink/private/SDLError.m +++ b/SmartDeviceLink/private/SDLError.m @@ -15,6 +15,14 @@ NS_ASSUME_NONNULL_BEGIN @implementation NSError (SDLErrors) ++ (NSError *)sdl_failedToCreateObjectOfClass:(Class)objectClass { + return [NSError errorWithDomain:SDLErrorDomainSystem code:SDLSystemErrorFailedToCreateObject userInfo:@{ + NSLocalizedDescriptionKey: [NSString stringWithFormat: @"iOS system failed to create a new object of class: %@", objectClass], + NSLocalizedFailureReasonErrorKey: @"An unknown error caused iOS to fail to create an object", + NSLocalizedRecoverySuggestionErrorKey: @"There is no known way to fix this error" + }]; +} + #pragma mark - SDLEncryptionLifecycleManager + (NSError *)sdl_encryption_lifecycle_notReadyError { NSDictionary<NSString *, NSString *> *userInfo = @{ |