Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose ErrorHandler protocol; inject errorHandler into Turntable #95

Merged
merged 2 commits into from
May 13, 2019

Conversation

Kastet
Copy link
Contributor

@Kastet Kastet commented Apr 28, 2019

  • Bumping Xcode to 10.2
  • Exposing ErrorHandling protocol and injecting errorHandler into Turntable. This might be useful if custom handling is required, for example, you might want to fail current test if a request wasn't found. This change doesn't introduce breaking changes.
struct ReplayErrorHandler: ErrorHandler {
    func handleTrackNotFound(_ request: Request, playTracksUniquely: Bool) {
        XCTFail("Record not found: \(request)")
    }

    func handleUnknownError() {
        XCTFail("Unknown error")
    }
}

@Kastet
Copy link
Contributor Author

Kastet commented May 13, 2019

hey @dmcrodrigues, do you have a chance to review?

Copy link
Contributor

@mluisbrown mluisbrown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @Kastet 👍 Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants