inspectorG4dget / AnonymousFeedback

1 stars 0 forks source link

Wrapped pg8000 statement executions in try/excepts. #51

Closed scriptbae closed 7 years ago

scriptbae commented 7 years ago

All calls to pg8000.cursor.execute are now wrapped in try/except blocks which catch both pg8000.ProgrammingErrrors as well as generic errors, and log them to the command line.

Currently, the suggested (by @NuclearBanane) integration with Slog isn't included, and logging is done exclusively as a simple message to the command line.

This is a feature branch providing 100% error handling coverage to the database interface layer, featuring rollbacks for any failed query.

Addresses and resolves #38.

scriptbae commented 7 years ago

Closing this as it would conflict with major editions to dbhandler.py introduced on the ui-devel branch. The changes in this PR will be backported and reintroduced in the next PR.