title: Does using try / catch rather than `.catch` observable operator with XHR requests reduce performance?
body: <p>I have a hypothetical question, well kind of - I was asked to join a new project and I was looking over the code. It was the usual kind of thing you would expect to see in an Angular project however in the service files all HTTP requests were wrapped in a JavaScript <code>try / catch</code> rather than using the <code>.catch</code> observable operators to handle errors. I had never seen this before and suggested using the in built in <code>.catch</code> observable operator. A code example of what I found is below (notice that the language is TypeScript).</p>
  
  <pre><code>public getSomething(id: string): Observable&lt;any&gt; {
      try {
        return this.http.get('someurl/someparam')
          .map((res) =&gt; res.json().data);
      } catch (e) {
        throw new Error('Error with getSomething()');
      }
    }
  </code></pre>
  
  <p>My suggestion was met with resistance and I was told that it didn't make any difference to performance (both memory and network). If that is the case I made the argument that the try/catch isn't returning the true error from the HTTP request. So my question is, despite this being considered an anti-pattern (or not), does wrapping a <code>try / catch</code> around the <code>http.get</code> reduce performance? I was also under the assumption that <code>try / catch</code> was used with synchronous not asynchronous code - once again an assumption on my part.</p>
  
  <p>If this is a bad non-specific question just say so and I will remove. But I would like other developers' opinions on this.</p>