Previous topic  Top  Next topic  Print this Topic
 

Error Handling

 

Using the API and working with SPARQL queries is straightforward. If invalid (in terms of syntax or supported by OntoBroker) queries are specified, one of the following issues should be checked:

General syntax/parser issues: The obvious case.
Reuse of blank node in different graph patterns: According to SPARQL definition, it is prohibited to share blank nodes in different graph patterns.
Unsupported expression: The arithmetic comparison of boolean sub-expressions is not supported.
Variables not bound by graph pattern: Variables which are not bound inside a basic graph pattern will raise an exception. This is a design decision to prevent the rather uncommon case of intensionally unbound variables and should be seen as a error indicator, for example, typos in query variables.
Invalid query options syntax: A syntax violation or unknown option in the OPTIONS argument.
Conflicting namespace definitions: Namespaces can be specified inside the query string and using the namespace argument for query creation. If both places provide conflicting information, i.e. same prefix but different namespace, an exception indicates this mismatch.
Ordering on boolean expressions: Expressions used in ORDER blocks always have to return non-boolean values.