Semantic MediaWiki and related extensions
Public Member Functions | Public Attributes | List of all members
SMW\SPARQLStore\Exception\BadHttpDatabaseResponseException Class Reference
Collaboration diagram for SMW\SPARQLStore\Exception\BadHttpDatabaseResponseException:
Collaboration graph
[legend]

Public Member Functions

 __construct ($errorCode, $queryText, $endpoint, $httpCode= '< not given >')
 

Public Attributes

const ERROR_MALFORMED = 1
 Error code: malformed query. More...
 
const ERROR_REFUSED = 2
 Error code: service refused to handle the request. More...
 
const ERROR_GRAPH_NOEXISTS = 3
 Error code: the query required a graph that does not exist. More...
 
const ERROR_GRAPH_EXISTS = 4
 Error code: some existing graph should not exist to run this query. More...
 
const ERROR_OTHER = 5
 Error code: unknown error. More...
 
const ERROR_NOSERVICE = 6
 Error code: required service not known. More...
 
 $queryText
 
 $errorCode
 

Detailed Description

Class to escalate SPARQL query errors to the interface. We only do this for malformed queries, permission issues, etc. Connection problems are usually ignored so as to keep the wiki running even if the SPARQL backend is down.

GNU GPL v2+

Since
1.6
Author
Markus Krötzsch

Constructor & Destructor Documentation

SMW\SPARQLStore\Exception\BadHttpDatabaseResponseException::__construct (   $errorCode,
  $queryText,
  $endpoint,
  $httpCode = '<not given>' 
)

Constructor that creates an error message based on the given data.

Parameters
$errorCodeinteger error code as defined in this class
$queryTextstring with the original SPARQL query/update
$endpointstring URL of the endpoint
$httpCodemixed integer HTTP error code or some string to print there

Member Data Documentation

SMW\SPARQLStore\Exception\BadHttpDatabaseResponseException::$errorCode
SMW\SPARQLStore\Exception\BadHttpDatabaseResponseException::$queryText
const SMW\SPARQLStore\Exception\BadHttpDatabaseResponseException::ERROR_GRAPH_EXISTS = 4

Error code: some existing graph should not exist to run this query.

const SMW\SPARQLStore\Exception\BadHttpDatabaseResponseException::ERROR_GRAPH_NOEXISTS = 3

Error code: the query required a graph that does not exist.

const SMW\SPARQLStore\Exception\BadHttpDatabaseResponseException::ERROR_MALFORMED = 1

Error code: malformed query.

const SMW\SPARQLStore\Exception\BadHttpDatabaseResponseException::ERROR_NOSERVICE = 6

Error code: required service not known.

const SMW\SPARQLStore\Exception\BadHttpDatabaseResponseException::ERROR_OTHER = 5

Error code: unknown error.

const SMW\SPARQLStore\Exception\BadHttpDatabaseResponseException::ERROR_REFUSED = 2

Error code: service refused to handle the request.


The documentation for this class was generated from the following file: