title: IWebBrowser2::Navigate2 error handling
body: <p>What is the correct way to handle errors? I've code like following, handling all error codes I've found on MSDN and still, sometimes, I've received error "Unknown".</p>
  
  <pre><code>HRESULT hr = pwb-&gt;Navigate2(&amp;URL, &amp;Flag, &amp;TargetFrameName, &amp;PostData, &amp;Headers);
  if(FAILED(hr))
  {
      std::string message("Navigate2 failed with reason: ");
      switch(hr)
      {
          // The operation was successful.
          case S_OK:
              message.append("S_OK");
              break;
          // One or more parameters are invalid.
          case E_INVALIDARG:
              message.append("E_INVALIDARG");
              break;
          // Out of memory.
          case E_OUTOFMEMORY:
              message.append("E_OUTOFMEMORY");
              break;
          // The operation failed.
          case E_FAIL:
              message.append("E_FAIL");
              break;
          case E_ACCESSDENIED:
              message.append("E_ACCESSDENIED");
              break;
          case E_POINTER:
              message.append("E_POINTER");
              break;
          case E_UNEXPECTED:
              message.append("E_UNEXPECTED");
              break;
          default:
              message.append("Unknown");
      }
  }
  </code></pre>