If the error_trace payload is available, add it to the string representation of the Error class.
This way, any layer using the driver, e.g. our SqlAlchemy Dialect, can display the error trace without to handle concrete exceptions. Additionally, handling the concrete exception and reading the self.error_trace variable won't be always possible (e.g. in generic SqlAlchemy abstractions).
If the error_trace is available is already depending on the concrete connect(error_trace=True) attribute and thus in control of the user.
If the
error_trace
payload is available, add it to the string representation of the Error class.This way, any layer using the driver, e.g. our SqlAlchemy Dialect, can display the error trace without to handle concrete exceptions. Additionally, handling the concrete exception and reading the
self.error_trace
variable won't be always possible (e.g. in generic SqlAlchemy abstractions). If the error_trace is available is already depending on the concreteconnect(error_trace=True)
attribute and thus in control of the user.