title: How to catch many exceptions at the same time in Kotlin?
body: <pre><code>try { 
  
  } catch (ex: MyException1, MyException2 ) {
      logger.warn("", ex)
  }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>try { 
  
  } catch (ex: MyException1 | MyException2 ) {
      logger.warn("", ex)
  }
  </code></pre>
  
  <p>As a result, a compilation error: <code>Unresolved reference: MyException2</code>.</p>
  
  <p>How can I catch many exceptions at the same time on Kotlin?</p>