Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Until now, a parameter failure_msg had to be passed to try_network_action() . An error with this message was then raised if the network action failed, and the details of the error were logged inside try_network_action() . This architecture is subpar. In the new architecture, try_network_action() only does its core job, and lets errors escalate. The caller is now responsible to log the original error and raise a new user-friendlier one. When logging the original error inside an except clause, the additional parameter exc_info=True must be passed, so that the stack trace is also logged. At the moment, the print() statements are still an important user feedback. Often, the same message is logged and then printed. This doubling is intentional. This task concentrates only on try_network_action(), so there are now some modules where there are only some few log statements. This inconsistency will be addressed in a separate task; then, log statements will be added systematically.
- Loading branch information