[server] print backend exception if we fail to execute an sql script
It's more useful to see
could not open extension control file "/usr/share/postgresql/9.4/extension/postgis.control": No such file or directory
rather than merely
-> ERROR, skipping /usr/share/cubicweb/cubes/postgis/schema/_ext.postgres.sql
--- a/cubicweb/server/sqlutils.py Tue Mar 15 14:59:24 2016 +0100
+++ b/cubicweb/server/sqlutils.py Fri Mar 04 12:17:58 2016 +0100
@@ -97,7 +97,8 @@
try:
# some dbapi modules doesn't accept unicode for sql string
execute(str(sql))
- except Exception:
+ except Exception as ex:
+ print(ex, file=sys.stderr)
if cnx:
cnx.rollback()
failed.append(sql)