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

Add error-handling exercise #92

Merged
merged 3 commits into from
Sep 16, 2024

Conversation

ageron
Copy link
Contributor

@ageron ageron commented Sep 15, 2024

This draft exercise covers various error handling techniques:

  • Result.try and the try operator ?
  • Result.mapErr
  • Using machine-friendly errors (i.e., meaningful tag + relevant payload)
  • Where/when to produce error messages
  • Error message internationalization

It does not cover:

  • Handling errors when using effects (Task)
  • Mixing Result and Task
  • Releasing resources in case of error

I think we have two options to cover the remaining points:

  • Complete this exercise, e.g., by reading the user database from a file (e.g., a JSON file?)
  • Create a separate exercise dedicated to these points

@Anton-4 Anton-4 self-assigned this Sep 15, 2024
@Anton-4
Copy link
Contributor

Anton-4 commented Sep 15, 2024

This looks really good so far @ageron, a well chosen example :)

Create a separate exercise dedicated to these points

I think that's best, we don't want to introduce too many new things at once.

@ageron ageron marked this pull request as ready for review September 15, 2024 23:55
Copy link
Contributor

@Anton-4 Anton-4 left a comment

Choose a reason for hiding this comment

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

Thanks @ageron!

config.json Outdated Show resolved Hide resolved
Copy link
Contributor

@isaacvando isaacvando left a comment

Choose a reason for hiding this comment

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

Love it!

@ageron ageron merged commit a65e76e into exercism:main Sep 16, 2024
2 checks passed
@ageron ageron deleted the add-error-handling-exercise branch September 16, 2024 19:43
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