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

Print pretty error message when Result.Failure is thrown #3391

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

lolgab
Copy link
Member

@lolgab lolgab commented Aug 19, 2024

The new .getOrThrow API allows to short-circuit the result of a Result. This prints a correct error message when Result.Failure is thrown in a method returning T, instead of returned via a method returning Result[T].

Pull Request: #3391

@lolgab lolgab merged commit cd23136 into com-lihaoyi:main Aug 19, 2024
31 checks passed
@lolgab lolgab deleted the fix-message-failure branch August 19, 2024 13:55
lolgab added a commit to lolgab/mill that referenced this pull request Aug 19, 2024
…#3391)

The new `.getOrThrow` API allows to short-circuit the result of a
`Result`. This prints a correct error message when `Result.Failure` is
thrown in a method returning `T`, instead of returned via a method
returning `Result[T]`.

Pull Request: com-lihaoyi#3391
@lefou lefou added this to the 0.12.0 milestone Aug 19, 2024
lolgab added a commit that referenced this pull request Aug 19, 2024
) (#3393)

The new `.getOrThrow` API allows to short-circuit the result of a
`Result`. This prints a correct error message when `Result.Failure` is
thrown in a method returning `T`, instead of returned via a method
returning `Result[T]`.

Backport of pull request: #3391

Pull Request: #3393
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants