Closed mcfunley closed 4 years ago
Is it good idea to catch the exception and raise a new one with new message? I am not good with try cache as they effect on performance, specially not on the data-layer! Can pugsql compiler detect if the queries are using keys or positional arguments? Of-course it make compiler more complex but this way it is possible to use python typing system and prevent this kind of problems, beside no overhead in runtime will be added!
See discussion in issue: https://github.com/mcfunley/pugsql/issues/38
When calling a query method as:
Rather than:
You get an unhelpful error. Ideally the exception text would tell you to use kwargs.