diff options
author | Paul Beusterien <paulbeusterien@google.com> | 2018-01-09 07:43:37 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-09 07:43:37 -0800 |
commit | e7347dc2f0c1a4b8bed6e85411021feb4634e405 (patch) | |
tree | b9b0421750a48a9aa34a995b1060992055a543e9 /Firebase | |
parent | ad976955194148823ec97ef09bbea742b37b6662 (diff) |
Delete unused private FIRCreateError (#631)
Diffstat (limited to 'Firebase')
-rw-r--r-- | Firebase/Core/FIRApp.m | 12 | ||||
-rw-r--r-- | Firebase/Core/FIRErrors.m | 4 | ||||
-rw-r--r-- | Firebase/Core/Private/FIRErrors.h | 10 |
3 files changed, 9 insertions, 17 deletions
diff --git a/Firebase/Core/FIRApp.m b/Firebase/Core/FIRApp.m index 800d180..b5e043f 100644 --- a/Firebase/Core/FIRApp.m +++ b/Firebase/Core/FIRApp.m @@ -368,7 +368,9 @@ static FIRApp *sDefaultApp; NSLocalizedRecoverySuggestionErrorKey : @"Check formatting and location of GoogleService-Info.plist." }; - return FIRCreateError(kFirebaseCoreErrorDomain, FIRErrorCodeInvalidPlistFile, errorDict); + return [NSError errorWithDomain:kFirebaseCoreErrorDomain + code:FIRErrorCodeInvalidPlistFile + userInfo:errorDict]; } + (NSError *)errorForSubspecConfigurationFailureWithDomain:(NSString *)domain @@ -379,7 +381,9 @@ static FIRApp *sDefaultApp; [NSString stringWithFormat:@"Configuration failed for service %@.", service]; NSDictionary *errorDict = @{NSLocalizedDescriptionKey : description, NSLocalizedFailureReasonErrorKey : reason}; - return FIRCreateError(domain, code, errorDict); + return [NSError errorWithDomain:domain + code:code + userInfo:errorDict]; } + (NSError *)errorForInvalidAppID { @@ -389,7 +393,9 @@ static FIRApp *sDefaultApp; @"Check formatting and location of GoogleService-Info.plist or GoogleAppID set in the " @"customized options." }; - return FIRCreateError(kFirebaseCoreErrorDomain, FIRErrorCodeInvalidAppID, errorDict); + return [NSError errorWithDomain:kFirebaseCoreErrorDomain + code:FIRErrorCodeInvalidAppID + userInfo:errorDict]; } + (BOOL)isDefaultAppConfigured { diff --git a/Firebase/Core/FIRErrors.m b/Firebase/Core/FIRErrors.m index 3c7e39a..6d6d52d 100644 --- a/Firebase/Core/FIRErrors.m +++ b/Firebase/Core/FIRErrors.m @@ -27,7 +27,3 @@ NSString *const kFirebaseDurableDeepLinkErrorDomain = @"com.firebase.durabledeep NSString *const kFirebaseInstanceIDErrorDomain = @"com.firebase.instanceid"; NSString *const kFirebasePerfErrorDomain = @"com.firebase.perf"; NSString *const kFirebaseStorageErrorDomain = @"com.firebase.storage"; - -NSError *FIRCreateError(NSString *domain, enum FIRErrorCode code, NSDictionary *userInfo) { - return [NSError errorWithDomain:domain code:code userInfo:userInfo]; -} diff --git a/Firebase/Core/Private/FIRErrors.h b/Firebase/Core/Private/FIRErrors.h index 9a03575..cf69252 100644 --- a/Firebase/Core/Private/FIRErrors.h +++ b/Firebase/Core/Private/FIRErrors.h @@ -31,13 +31,3 @@ extern NSString *const kFirebaseDurableDeepLinkErrorDomain; extern NSString *const kFirebaseInstanceIDErrorDomain; extern NSString *const kFirebasePerfErrorDomain; extern NSString *const kFirebaseStorageErrorDomain; - -/** - * Factory for a NSError in the Firebase error domain. - * - * @param domain Domain of Firebase error. - * @param code Error code that NSError should have. - * @param userInfo User info that NSError should have. - * @return An NSError in the Firebase domain. - */ -extern NSError *FIRCreateError(NSString *domain, FIRErrorCode code, NSDictionary *userInfo); |