1
2
3 """
4
5 SPARQL Wrapper exceptions
6
7 @authors: U{Ivan Herman<http://www.ivan-herman.net>}, U{Sergio Fernández<http://www.wikier.org>}, U{Carlos Tejo Alonso<http://www.dayures.net>}
8 @organization: U{World Wide Web Consortium<http://www.w3.org>} and U{Foundation CTIC<http://www.fundacionctic.org/>}.
9 @license: U{W3C® SOFTWARE NOTICE AND LICENSE<href="http://www.w3.org/Consortium/Legal/copyright-software">}
10
11 """
12
13
15 """
16 Base class for SPARQL Wrapper exceptions
17 """
18
19 msg = "an exception has occurred"
20
22 if response:
23 formatted_msg = "%s: %s. \n\nResponse:\n%s" % (self.__class__.__name__, self.msg, response)
24 else:
25 formatted_msg = "%s: %s." % (self.__class__.__name__, self.msg)
26
27 super(SPARQLWrapperException, self).__init__(formatted_msg)
28
30 """
31 Exception type for 500 Internal Server Error responses.
32 """
33
34 msg = "endpoint returned code 500 and response"
35
36
43
44
46 """
47 End Point Not Found exception
48 """
49
50 msg = "it was impossible to connect with the endpoint in that address, check if it is correct"
51