title: Handling bad argument in a function Erlang without using try-catch
body: <p>I want to try to handle a bad argument given to my function <em>without</em> using try-catch.</p>
  
  <pre><code>countdown(N) when N &gt; 0 -&gt;
      io:format("~p ~n", [N]),
      countdown(N-1);
  countdown(N) when N == 0 -&gt;
      io:format("Zero ~n");
  countdown(_N) -&gt;
      stop.
  </code></pre>