title: In Kotlin exception blocks, how does one implement an 'else' (success) block?
body: <p>In Python, I would do this:</p>
  
  <pre><code>try:
      some_func()
  except Exception:
      handle_error()
  else:
      print("some_func was successful")
      do_something_else()  # exceptions not handled here, deliberately
  finally:
      print("this will be printed in any case")
  </code></pre>
  
  <p>I find this very elegant to read; the <code>else</code> block will only be reached if no exception was thrown.</p>
  
  <p>How does one do this in Kotlin? Am I supposed to declare a local variable and check that below the block?</p>
  
  <pre><code>try {
      some_func()
      // do_something_else() cannot be put here, because I don't want exceptions
      // to be handled the same as for the statement above.
  } catch (e: Exception) {
      handle_error()
  } finally {
      // reached in any case
  }
  // how to handle 'else' elegantly?
  </code></pre>
  
  <p>I found <a href="https://kotlinlang.org/docs/tutorials/kotlin-for-py/exceptions.html" rel="nofollow noreferrer">Kotlin docs | Migrating from Python | Exceptions</a>, but this does not cover the <code>else</code> block functionality as found in Python.</p>