qentinelqi / qweb

Keyword driven automation for the web
https://github.com/qentinelqi/qweb
Apache License 2.0
40 stars 17 forks source link

Improve exception handling traceability #89

Closed turunenm closed 9 months ago

turunenm commented 2 years ago

Currently debugging exceptions can be tricky since lot of the exceptions get caught and reraised as different QWeb equivalent type. This usually helps us to identify whether or not the exception has been considered during development. However on some occasions this exception type changing obfuscates the original exception and can make debugging very tedious.

Improve exception handling traceability by going through each in the except block QWeb code base and on type changing raises use raise QWebException(e) from e instead of plain raise QWebException(e) in order to preserve the stacktrace. Error messages should also be assessed and improved where necessary.

tkoukkari commented 9 months ago

I think this one is part of linting rules nowadays and should be handled in at least most cases.

tkoukkari commented 9 months ago

Yep, this has been checking those for a while and nags if we add more: [W0707:(raise-missing-from)