title: How to throw new ElementNotFoundException?
body: <pre><code>int btnSize = driver.findElements(By.xpath("...")).size();
  
  if ( btnSize &gt; 1) {
      List&lt;WebElement&gt; b = driver.findElements(By.xpath("..."));
  } else if (btnSize == 1){
      WebElement b = driver.findElement(By.xpath("..."));
  } else {
  
      //How do I throw an Exception (e.g. ElementNotFoundException)
      //these variants did not work?
  
      throw ElementNotFoundException;     
      throw (new ElementNotFoundException);
      throw (new ElementNotFoundException("not found"));
      throw (new ElementNotFoundException(Exception e));
  }
  </code></pre>