Skip to content

Commit

Permalink
fix: prevent hiding original exception when MUC start fails.
Browse files Browse the repository at this point in the history
When starting/joining a MUC fails, 'leave' is called as part of the
exception handling. In case 'leave' throws an exception, this exception
should not be thrown instead of the original exception that was thrown
when start failed.
  • Loading branch information
guusdk authored and paweldomas committed Jun 12, 2018
1 parent 50ab7f2 commit 84b22c9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/main/java/org/jitsi/jicofo/JitsiMeetConferenceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,18 @@ public synchronized void start()
}
catch (Exception e)
{
stop();
try
{
stop();
}
catch (Exception x)
{
logger.warn("An exception was caught while invoking stop()"
+ " as part of handling another exception that occurred"
+ " while invoking start(). This is the exception that"
+ " stop() threw (start()'s exception will be thrown"
+ " next).", x);
}

throw e;
}
Expand Down

0 comments on commit 84b22c9

Please sign in to comment.