-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network: clean TorGuard exception handling (Not Tested) #49
Conversation
c67775a
to
d0ebbee
Compare
d0ebbee
to
0972735
Compare
Is this all the places we do try-with in TorGuard? |
Nope, There was another |
WTF that's a generic catch, let's remove it in a 2nd commit (after removing it, we might get some crashes; but thanks to getting them, we'll be able to bring a more specific try-block later. |
Sounds good. I'll work on this after addressing the previous typos (which won't take long). |
Move TorGuard exception handling to a new module so that every time we want to handle a new type of exception, we won't be bothered by adding a lot of try/except expressions. This code is necessary for fixing [1]. Fixes nblockchain#45 [1] nblockchain/geewallet#184
0972735
to
affb114
Compare
Technically, I had a reason for putting a generic catch there.
you won't. exceptions there won't be raised. only exception you might get is CircuitDestroyed-like exceptions when guard dies. |
What I'm most afraid is that I remember getting ObjectDisposedExceptions (I'm not sure if it was here) which I do not like being raised because you can just swallow them (as far as the listening thread cares). |
Huh! I have a comment about this:
|
TL/DR: Personally, I prefer keeping that generic catch there. |
Move TorGuard exception handling to a new module so that every time we want to handle a new type of exception, we
won't be bothered by adding a lot of try/except expressions.
This code is necessary for fixing [1].
Fixes #45
[1] nblockchain/geewallet#184