Skip to content

Commit

Permalink
fix(vertx): Add error logging to exceptions in vertx (#819)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt committed Jul 10, 2023
1 parent ec80525 commit 3b3f843
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ private Project getKnownProject() {
}

void mine(@Observes StartupEvent event) {
logger.atInfo().log("Starting Qodana periodic miner");
vertx.setTimer(TimeUnit.MINUTES.toMillis(5), v -> vertx.executeBlocking(it -> mineRandomRepo()));
try {
logger.atInfo().log("Starting Qodana periodic miner");
vertx.setTimer(TimeUnit.MINUTES.toMillis(5), v -> vertx.executeBlocking(it -> mineRandomRepo()));
} catch (Exception e) {
logger.atWarning().withCause(e).log("Failed to repo with Qodana");
}
}

private void mineRandomRepo() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ private Project getKnownProject() {
}

void mine(@Observes StartupEvent event) {
logger.atInfo().log("Start mining with spoon");
vertx.setTimer(TimeUnit.MINUTES.toMillis(5), v -> vertx.executeBlocking(it -> mineRandomRepo()));
try {
logger.atInfo().log("Start mining with spoon");
vertx.setTimer(TimeUnit.MINUTES.toMillis(5), v -> vertx.executeBlocking(it -> mineRandomRepo()));
} catch (Exception e) {
logger.atWarning().withCause(e).log("Failed to repo with spoon");
}
}

private void mineRandomRepo() {
Expand Down

0 comments on commit 3b3f843

Please sign in to comment.