Skip to content

Commit

Permalink
Clear service cache when capture exception occurs.
Browse files Browse the repository at this point in the history
Signed-off-by: Sjoerd Talsma <[email protected]>
  • Loading branch information
sjoerdtalsma committed Dec 1, 2024
1 parent 111da06 commit f72a61e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ static ContextSnapshot capture() {
return new ContextSnapshotImpl();
} catch (RuntimeException e) {
SNAPSHOT_LOGGER.log(Level.FINEST, e, () -> "Error capturing ContextSnapshot from " + Thread.currentThread().getName() + ": " + e.getMessage());
ServiceCache.clear();
throw error = e;
} finally {
timed(System.nanoTime() - start, ContextSnapshot.class, "capture", error);
Expand Down

0 comments on commit f72a61e

Please sign in to comment.