Lesson 9: Better Error Messages

Contents
  • The problem
  • The error functions
  • Gathering up the errors
  • Lists upon lists
  • Coercion
  • Handling success
  • The final main
Video
  • 21 minutes

We have come a very long way in this course and we might be tempted to rest after all we’ve done. However, with a just a little more effort we can pass much nicer, easier to read error (and success!) messages along to our users. To facilitate this, we write an errorCoerce function so that we can use list functions with our Error newtype, and then we finish the course with tidy and informative error messages.

Sign up for access to the full page, plus the complete archive and all the latest content.