Skip to content

Commit

Permalink
Refactor error code initializer to be public
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenTiigi committed Feb 3, 2025
1 parent 074088d commit 7458917
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/Models/Error/YouTubePlayer+Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ public extension YouTubePlayer {

// MARK: - Error+init(errorCode:)

extension YouTubePlayer.Error {
public extension YouTubePlayer.Error {

/// The error codes dictionary.
private static let errorCodes: [Int: Self] = [
static let errorCodes: [Int: Self] = [
2: .invalidSource,
5: .html5NotSupported,
100: .notFound,
101: .embeddedVideoPlayingNotAllowed,
150: .embeddedVideoPlayingNotAllowed
]

/// Creates a new instance of ``YouTubePlayer.Error``.
/// Creates a new instance of ``YouTubePlayer/Error``.
/// - Parameters:
/// - errorCode: The error code.,
/// - errorCode: The error code.
init?(
errorCode: Int
) {
Expand Down

0 comments on commit 7458917

Please sign in to comment.