title: protractor wait timeout catch and continue
body: <p>I have a piece of code in protractor to do a wait:</p>
  
  <pre><code>public waitForElement() {
      return browser.wait(
          ExpectedConditions.visibilityOf(element(by.id('#someEl'))),
          10000,
          'Unable to find the element'
          );
  }
  </code></pre>
  
  <p>My issue is that I cannot seem to catch this exception if it times out. I tried adding a catch() clause, which does not work, e.g.:</p>
  
  <pre><code>this.waitForElement()
      .then(() =&gt; { /* do something */ })
      .catch(() =&gt; { /* handle the error -- this code never happens if there is a timeout!!! */ });
  </code></pre>
  
  <p>I tried putting the code in a try-catch block, but that doesn't help either:</p>
  
  <pre><code>try { this.waitForElement().then(() =&gt; { }); }
  catch (ex) { /* this exception is never caught, the test just fails!! */ }
  </code></pre>
  
  <p>I'm stumped: how can I catch the wait timeout and continue with the test without the test failing?</p>