gjhiggins/rdflib — Issue #169: parser.py raises unexpected Exception
Author: gjhiggins
Created: 2011-10-19 01:34:55+00:00
State: open

Originally filed by danielmr...@gmail.com on 2011-04-28T06:57:45

What steps will reproduce the problem?

import rdflib
rdflib.graph.Graph().parse(source="http://w3c.org/doesnotexist")

What is the expected output? What do you see instead?

HTTPError

What version of the product are you using? On what operating system?

Exception('"%s" while trying to open "%s"' % (e, self.url))

Instead of raising its own Exception why not take the Exception we get from urlopen()?

line 92:
- try:
- file = urlopen(req)
- except HTTPError, e:
- # TODO:
- raise Exception('"%s" while trying to open "%s"' % (e, self.url))
+
+ file = urlopen(req)
+