Closed hroncok closed 1 year ago
Should we catch other errors and report the actual error, rather than letting them drop to the caller?
Should we catch other errors and report the actual error, rather than letting them drop to the caller?
I think all other errors are bugs in the code. But if you want to stay safe, we can do something like this:
except UnicodeError:
self.log(_("Attempted to write invalid text..."))
except Exception as e:
self.log(_("Unhandled exception: %s(%s)"), type(e), e))
All other errors are definitely bugs in the code. This way we can actually find them. I like your proposed solution.
Added the other except.
Fixes https://github.com/kliment/Printrun/issues/1302
Still testing.