-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Sending request with Jetty HTTP client: catching InterruptedException or not ? #10454
Comments
Interesting, I checked how I handled exceptions in the remote openHAB binding when sending a Jetty HTTP request and I see that I caught @openhab/add-ons-maintainers for advice. Should |
I see lots of code catching |
I just checked few bindings and each one is doing differently. If we would like to throw this exception to a higher level, the change is more difficult, it would require to change the method calling At first steps, we could change:
WDYT ? |
I'm fine with that. You could combine the catch clause for |
More generally in relation to your previous remark, I found 625 catch of PS: I also found 7 catch of Throwable. Maybe these ones should be updated. Concerned bindings: elerotransmitterstick, homematic and zway.
|
519 catch of |
I peeked into the 3 bindings catching Checkstyle should generates a warning if
|
Closing that as you have the answer. |
@octa22 : I was asking myself if it is really useful to catch InterruptedException to then call
You are doing that just to change the thing status.
But if the thread is interrupted, we can imagine that is for a severe reason and the thing handler will be certainly destroyed when it occurs.
My feeling is that InterruptedException should not be caught.
WDYT ? What was you reason to do that ?
The text was updated successfully, but these errors were encountered: