Skip to content

Commit

Permalink
[event-bus] Handle Json parsing error such that future messages are n…
Browse files Browse the repository at this point in the history
…ot blocked
  • Loading branch information
pujagani committed Oct 25, 2021
1 parent 7941e12 commit 6bbafcd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.openqa.selenium.grid.security.Secret;
import org.openqa.selenium.internal.Require;
import org.openqa.selenium.json.Json;
import org.openqa.selenium.json.JsonException;
import org.openqa.selenium.json.JsonOutput;
import org.zeromq.SocketType;
import org.zeromq.ZContext;
Expand Down Expand Up @@ -256,6 +257,9 @@ public void run() {
} catch (Exception e) {
if (e.getCause() instanceof AssertionError) {
// Do nothing.
} else if (e instanceof JsonException) {
LOG.log(Level.WARNING, e, () -> "Caught exception while parsing for event bus messages: "
+ e.getMessage());
} else {
LOG.log(Level.WARNING, e, () -> "Caught exception while polling for event bus messages: "
+ e.getMessage());
Expand Down

0 comments on commit 6bbafcd

Please sign in to comment.