Instruments of Texas


Story

In this exercise you will be handling errors being raised by functions created by your team while creating an RPN calculator.

(Note: there is no actual implementation of a calculator in this exercise.)

Tasks

The student implements a function in to handle errors in three ways:

  • allow the error to propagate
  • rescue (catch in some languages) from the error, output a result that communicates the failure (e.g. :error in Elixir)
  • rescue (catch in some languages) from the error, output a result that communicates the failure with a message (e.g. {:error, "message"} in Elixir)

Implementations