exercism/elixir/rpn-calculator/HINTS.md

687 B

Hints

General

  • Read about errors in the Getting Started guide.
  • Read about try in the documentation.

1. Warn the team

  • Allow the operation function to raise its error.
  • To invoke a function in a variable, use the . operator.

2. Wrap the error

  • Make use of try .. rescue to return the intended result.

3. Pass on the message

  • Make use of try .. rescue to return the intended result.
  • The rescue block allows you to pattern match on the error's Module name and also bind the error to a variable.