Skip to content

Commit 8600385

Browse files
Copilotbrunoborges
andcommitted
Address code review feedback
Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
1 parent dec4386 commit 8600385

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/java/com/github/copilot/sdk/CopilotSession.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,9 @@ void dispatchEvent(AbstractSessionEvent event) {
469469
LOG.log(Level.SEVERE, "Error in event error handler", errorHandlerException);
470470
break; // error handler itself failed — stop to be safe
471471
}
472+
} else {
473+
// No error handler set: continue silently (no logging)
472474
}
473-
// No error handler set: continue silently (no logging)
474475
}
475476
}
476477
}

src/main/java/com/github/copilot/sdk/EventErrorHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
* <p>
5858
* If the error handler itself throws an exception, that exception is caught,
5959
* logged at {@link java.util.logging.Level#SEVERE}, and dispatch is stopped to
60-
* prevent cascading failures.
60+
* prevent cascading failures. When the error handler throws, its return value
61+
* (if it would have been computed) is ignored.
6162
*
6263
* @see CopilotSession#setEventErrorHandler(EventErrorHandler)
6364
* @since 1.0.8

0 commit comments

Comments
 (0)