display ExceptionErrors in sparklquery
authorKatia Saurfelt <katia.saurfelt@logilab.fr>
Mon, 07 Apr 2014 17:13:27 +0200
changeset 415 dd4a0f979759
parent 414 68d1ae13c3b0
child 417 96fc22a46fad
display ExceptionErrors in sparklquery
utils/dataio.py
--- a/utils/dataio.py	Mon Apr 07 13:56:17 2014 +0000
+++ b/utils/dataio.py	Mon Apr 07 17:13:27 2014 +0200
@@ -114,9 +114,9 @@
             # Bad json
             rawresults = sparql.query()
             return json.loads(codecs.escape_decode(rawresults.response.read())[0])
-    except:
+    except Exception, err:
         if raise_on_error:
-            raise RuntimeError('Error in sparql query')
+            raise RuntimeError('Error in sparql query', err)
         else:
             return []