title: Why Box/Option instead of Exception in LiftWeb/Scala?
body: <p>So, I've been reading <a href="http://lift.la/scala-option-lift-box-and-how-to-make-your-co" rel="nofollow">this article</a> about Box usage in LiftWeb which seems so be part of the official documentation as it's linked through the source code comments.
  My question is why is Box/Failure preferable to actually coding without null and throwing an Exception that would be caught at top level and transformed into an appropriate error code/message. So instead of </p>
  
  <pre><code>case "user" :: "info" :: _ XmlGet _ =&gt;
    for {
      id &lt;- S.param("id") ?~ "id param missing" ~&gt; 401
      u &lt;- User.find(id) ?~ "User not found"
    } yield u.toXml
  </code></pre>
  
  <p>why not</p>
  
  <pre><code>case "user" :: "info" :: _ XmlGet _ =&gt; User.find(S.param("id").openOrThrow(
      new IllegalArgumentException("idParamMissing"))).toXml
  </code></pre>
  
  <p>and have <code>User.find</code> throw something like <code>NotFoundException</code></p>