title: Reraise HTTPError with extra info
body: <p>I want to catch a <code>urllib2.HTTPError</code> with extra information if it's a 404:</p>
  
  <pre><code>try:
      data = urlopen(url)
  except HTTPError, e:  # Python 2.5 syntax
      if e.code == 404:
          raise HTTPError('data not found on remote')
      else:
          raise
  </code></pre>
  
  <p>but this doesn't work because <code>HTTPError</code>'s init takes multiple arguments, which are undocumented. It it did work, it would lose the backtrace and the original message. I also tried</p>
  
  <pre><code>if e.code == 404:
      e.message = 'data not found on remote: %s' % e.message
  raise
  </code></pre>
  
  <p>but that just re-raised the exception without extra information. What should I do?</p>