Skip to content

Commit

Permalink
FunctionsErrorCode -> FirebaseFunctionsErrorCode
Browse files Browse the repository at this point in the history
  • Loading branch information
darinf committed May 9, 2024
1 parent 75ed1ea commit 3fb84e0
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import firebase
@_spi(FirebaseInternal)
import FirebaseCore

public struct FunctionsErrorCode: Error {
public struct FirebaseFunctionsErrorCode: Error {
public let rawValue: Int
public let localizedDescription: String

Expand All @@ -19,7 +19,7 @@ public struct FunctionsErrorCode: Error {
}
}

extension FunctionsErrorCode: RawRepresentable {
extension FirebaseFunctionsErrorCode: RawRepresentable {
public typealias RawValue = Int

public init(rawValue: Int) {
Expand All @@ -28,7 +28,7 @@ extension FunctionsErrorCode: RawRepresentable {
}
}

extension FunctionsErrorCode {
extension FirebaseFunctionsErrorCode {
init(_ error: firebase.functions.Error, errorMessage: String?) {
self.init((code: error.rawValue, message: errorMessage ?? "\(error.rawValue)"))
}
Expand All @@ -43,7 +43,7 @@ extension FunctionsErrorCode {
}
}

extension FunctionsErrorCode {
extension FirebaseFunctionsErrorCode {
public static var none: Self { .init(firebase.functions.kErrorNone) }
public static var cancelled: Self { .init(firebase.functions.kErrorCancelled) }
public static var unknown: Self { .init(firebase.functions.kErrorUnknown) }
Expand All @@ -63,11 +63,11 @@ extension FunctionsErrorCode {
public static var dataLoss: Self { .init(firebase.functions.kErrorDataLoss) }
}

extension FunctionsErrorCode: Equatable {}
extension FirebaseFunctionsErrorCode: Equatable {}

extension FunctionsErrorCode {
extension FirebaseFunctionsErrorCode {
// The Obj C API provides this type as well, so provide it here for consistency.
public typealias Code = FunctionsErrorCode
public typealias Code = FirebaseFunctionsErrorCode

// This allows us to re-expose self as a code similarly
// to what the Firebase SDK does when it creates the
Expand Down

0 comments on commit 3fb84e0

Please sign in to comment.