walidazizi / rdflib

Automatically exported from code.google.com/p/rdflib
Other
0 stars 0 forks source link

parser.py raises unexpected Exception #170

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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)
+

Original issue reported on code.google.com by danielmr...@gmail.com on 28 Apr 2011 at 6:57

GoogleCodeExporter commented 8 years ago
Fair point.

Original comment by gromgull on 9 May 2011 at 11:40

GoogleCodeExporter commented 8 years ago
Fix applied in changeset 7fb275973ef2

Original comment by gjhigg...@gmail.com on 13 Jan 2012 at 2:35

GoogleCodeExporter commented 8 years ago
thanks!

Original comment by danielmr...@gmail.com on 26 Jan 2012 at 11:18

GoogleCodeExporter commented 8 years ago

Original comment by gromgull on 26 Jan 2012 at 11:21