4

Program seems to work better when there is about 2-3 times the amount of code related to error handling the task than just the task. I'm always glad to see quality stuff that accounts for the edge cases especially with helpful error messages.

Comments
  • 1
    At some point you will realize that many things have a finite number of states and outcomes. If you enumerate all of them, you can define how to deal with each case gracefully.
    Languages like Elm, F#, Haskell and others (ML descendants) work this way. They simply don't use exceptions, so it's much harder to accidentally crash your program by forgetting to catch one.
    Sadly many popular languages only have error handling like "one success response + undefined number of exceptions"
Add Comment