Catch sparql exceptions