title: when is exhaustive so else is redundant?
body: <p>I am new to kotlin and I created a method that contains the when statement and IntelliJ suggesting me to remove the else branch.
  I am not really sure why. Any idea why I need to remove the else branch here?
  This is the code:</p>
  
  <pre><code>    companion object{
      @Synchronized fun getDriver(
          url: String,
          desiredCapabilities: DesiredCapabilities,
          mobilePlatform: MobilePlatform)
          : AppiumDriver&lt;WebElement&gt; =
          when(mobilePlatform){
              MobilePlatform.ANDROID -&gt; AndroidDriver&lt;WebElement&gt;(URL(url), desiredCapabilities)
              MobilePlatform.IOS -&gt; IOSDriver&lt;WebElement&gt;(URL(url), desiredCapabilities)
              else -&gt; throw RuntimeException("Cannot get the driver")
          }
  }
  </code></pre>