title: Is Kotlin's runCatching..also equivalent to try..finally?
body: <p>I want to run cleanup code after a certain block of code completes, regardless of exceptions. This is not a closeable resource and I cannot use try-with-resources (or Kotlin's <code>use</code>).
  In Java, I could do the following:</p>
  <pre class="lang-java prettyprint-override"><code>try {
    // ... Run some code
  } catch(Exception ex) {
    // ... Handle exception 
  } finally {
    // ... Cleanup code
  }
  </code></pre>
  <p>Is the following Kotlin code equivalent?</p>
  <pre class="lang-kotlin prettyprint-override"><code>runCatching {
    // ... Run some code
  }.also {
    // ... Cleanup code
  }.onFailure {
    // ... Handle exception
  }
  </code></pre>
  <p>Edit: added boilerplate exception handling - my concern is with ensuring the cleanup code runs, and maintainability.</p>