chore: limit over-logging of handled exception (#17878)

[skip ci]
This commit is contained in:
Ankush Menat 2022-08-19 12:53:51 +05:30 committed by GitHub
parent eaf3aa28ee
commit f002016eb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -224,8 +224,9 @@ class Database:
raise
elif isinstance(e, self.ProgrammingError):
traceback.print_stack()
frappe.errprint(f"Error in query:\n{query, values}")
if frappe.conf.developer_mode:
traceback.print_stack()
frappe.errprint(f"Error in query:\n{query, values}")
raise
if not (