title: Protractor TRY/Catch issues
body: <p>I was using Protractor and Cucumber and noticed that there were instances where I wanted to capture a <code>NoSuchElementError: No element found using locator: By.cssSelector("someCssLocatorHere")</code>. However, using the traditional try/catch block wouldn't work unless I called both the callback and errBack of the .then() function and throw the error so that I can catch it later like following:</p>
  
  <pre><code>try{
    somePromise.then(function(){
    //callback function if promise gets resolved successfully
    }, function(e){
    console.log(e); //errBack in case promise gets rejected or fails
    throw e;   &lt;--------------- THROW error here so can catch it in catch block below
    });
   }catch(e){
      console.log('error:'+e);
   }
  </code></pre>
  
  <p>And the above solution was/is suggested by many answers on Stackoverflow. So I don't have any question but I am going to answer to my own question below to show you the proper way to handle this exception (<code>NoSuchElementError: No element found using locator: By.cssSelector("someCssLocator")</code>) without explicitly wrapping your code with try/catch blocks.</p>