title: scala's Try elegant on error behavior
body: <p>Is there a more elegant way of doing this in scala?</p>
  
  <pre><code>def doTheDangerousThing(): Try[Result] = {
    val result = Try(dangerousOp)
  
    if (result.isFailure) {
       println("error")
    }
  
    result
  }
  </code></pre>