Skip to content

Commit fd79860

Browse files
Merge pull request pandas-dev#8201 from jorisvandenbossche/sql-7730-errormessage
ERR: pass original error message in read_sql_query (GH7730)
2 parents 5bbe99e + 5796f0b commit fd79860

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/io/sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ def execute(self, *args, **kwargs):
11041104
"Execution failed on sql: %s\n%s\nunable to rollback" % (args[0], e))
11051105
raise_with_traceback(ex)
11061106

1107-
ex = DatabaseError("Execution failed on sql: %s" % args[0])
1107+
ex = DatabaseError("Execution failed on sql '%s': %s" % (args[0], e))
11081108
raise_with_traceback(ex)
11091109

11101110
def read_sql(self, sql, index_col=None, coerce_float=True, params=None,

0 commit comments

Comments
 (0)