[jitsi-dev] [jitsi/jitsi-videobridge] Exceptions should not be completely ignored (#343)


#1

This is a fix for https://github.com/jitsi/jitsi-videobridge/issues/342

When an exception occurs, it should not be ignored completely. If handling is not needed, the exception should be logged (if only at the lowest of log levels). This greatly reduces confusion while debugging a situation where a bug occurs caused by an exception that the original developer believed was "impossible".
You can view, comment on, or merge this pull request online at:

  https://github.com/jitsi/jitsi-videobridge/pull/343

-- Commit Summary --

  * Exceptions should not be completely ignored

-- File Changes --

    M openfire/src/java/org/jitsi/videobridge/openfire/PluginImpl.java (3)
    M src/main/java/org/jitsi/videobridge/IceUdpTransportManager.java (17)
    M src/main/java/org/jitsi/videobridge/RtpChannel.java (1)
    M src/main/java/org/jitsi/videobridge/ratecontrol/LastNBitrateController.java (1)
    M src/main/java/org/jitsi/videobridge/stats/PubSubStatsTransport.java (3)

-- Patch Links --

https://github.com/jitsi/jitsi-videobridge/pull/343.patch
https://github.com/jitsi/jitsi-videobridge/pull/343.diff

···

--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/343


#2

bgrozev commented on this pull request.

@@ -324,12 +324,15 @@ private void serviceChanged(ServiceEvent ev)

                 }
                 catch (IllegalArgumentException ex)
                 {
+ logger.debug( "An unexpected exception occurred.", ex );

Can you please collapse these three catch block into one with the java 7 "|" syntax?

···

--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/343#pullrequestreview-5485643


#3

@guusdk pushed 1 commit.

b97aa7d Identical 'catch' blocks can be collapsed.

···


You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/343/files/25c17e8c771870593963fcb9575c8de1a49ba079..b97aa7d910565a330ef3035a22fcbe5ef70494ab


#4

I fixed the one you referred, as well as a couple of others that were in the code.

···

--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/343#issuecomment-255795463


#5

Thanks! Will merge after the tests pass.

···

--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/343#issuecomment-255796324


#6

Merged #343.

···

--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/343#event-834258685