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. Usually HTTP response status code 500.
32 """
33
34 msg = "endpoint returned code 500 and response"
35
36
43
44
46 """
47 End Point Not Found exception. Usually HTTP response status code 404.
48 """
49
50 msg = "it was impossible to connect with the endpoint in that address, check if it is correct"
51
53 """
54 Access is denied due to invalid credentials (unauthorized). Usually HTTP response status code 401.
55 @since: 1.8.2
56 """
57
58 msg = "access is denied due to invalid credentials (unauthorized). Check the credentials"
59
67