title: Scala recover or recoverWith
body: <p>We are developing some systems in our company in Scala and we have some doubts. We were discussing about how to map the future exceptions and we don't know when we should use the option 1 or the option 2.</p>
  
  <pre><code>val created: Future[...] = ???
  </code></pre>
  
  <p>Option 1:
      </p>
  
  <pre><code>val a = created recover {   
    case e: database.ADBException =&gt;
      logger.error("Failed ...", e)
      throw new business.ABusinessException("Failed ...", e) 
  }
  </code></pre>
  
  <p>Option 2:</p>
  
  <pre><code>val a = created recoverWith {   
    case e: database.ADBException =&gt;
      logger.error("Failed ...", e)
      Future.failed(new business.ABusinessException("Failed ...", e))
  }
  </code></pre>
  
  <p>Could someone explain when should i do the option 1 or the option 2? What is the diff?</p>