title: How to properly catch an error with react native
body: <p>I am new with react native and I am trying catching an error in this way</p>
  
  <pre><code>Linking.openURL('test').catch(err =&gt;
       alert('error' + err)
     );
  </code></pre>
  
  <p>But If I try to log the error like this  </p>
  
  <pre><code>Linking.openURL('test').catch(err =&gt;
       alert('error' + err); // error in this line
       console.log(err);
     );
  </code></pre>
  
  <p>I get a syntax error because of the comma.</p>