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

Made FluentError init method public #408

Merged
merged 2 commits into from Mar 20, 2018

Conversation

3 participants
@calebkleveter
Copy link
Member

calebkleveter commented Mar 19, 2018

No description provided.

@rafiki270

This comment has been minimized.

Copy link
Contributor

rafiki270 commented Mar 19, 2018

@calebkleveter in my case I just needed this error only in tests so I used @testable import Fluent to get it. Disregard my comment if you need it on the front

@calebkleveter

This comment has been minimized.

Copy link
Member Author

calebkleveter commented Mar 19, 2018

I could use that hack, but I was going to use it in model inits:

guard let id = model.id else {
    throw FluentError(identifier: "noID", reason: "A model must have an ID to be connected to a pivot"
}

@tanner0101 tanner0101 added this to the 3.0.0-rc.2 milestone Mar 20, 2018

@tanner0101 tanner0101 self-assigned this Mar 20, 2018

@tanner0101

This comment has been minimized.

Copy link
Member

tanner0101 commented Mar 20, 2018

Agreed, this will be nice for the fluent drivers as well.

@tanner0101 tanner0101 merged commit f3585af into vapor:master Mar 20, 2018

1 check was pending

ci/circleci: linux Your tests are queued behind your running builds
Details

@calebkleveter calebkleveter deleted the calebkleveter:public-error-init branch Mar 22, 2018

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