title: Error handling in fphttpclient?
body: <p><strong>fphttpclient</strong> works fine with simple examples like</p>
  
  <pre><code>procedure ReadFromURL(theURL: string);
  var
    httpClient: TFPHTTPClient;
    FileContents: String;
    theStatusCode: integer; 
  begin
    httpClient := TFPHTTPClient.Create(nil);
    try
      FileContents := httpClient.Get(theURL);
      theStatusCode := httpClient.ResponseStatusCode;
      if theStatusCode = 200 then
       begin
         ; // do something
       end
      else
       ShowMessage(IntToStr(theStatusCode));
    finally
      httpClient.Free;
    end;
  end;
  </code></pre>
  
  <p>but only, if the URL exists, so that the status code is 200. In other cases the code crashes at <em>httpClient.Get</em> with an exception of class EHTTPClient, ESocketError or EXC_BAD_ACCESS, although the procedure uses a <em>try ... finally</em> section (formulating it as <em>try ... except</em> doesn't change anything). Unfortunately, the exception is raised before the status code can be processed.</p>
  
  <p>What is the recommended way to handle errors with fphttpclient? Is there any method to check for the existence of a resource (and, possibly, the correctness of an URL, too), before invoking the <em>Get</em> method?</p>