Skip to content

Commit c18175e

Browse files
authored
release: 2.3.3 (#414)
2 parents 13ada9c + 5cd362f commit c18175e

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/main/kotlin/org/gitanimals/render/infra/VisitedEventListener.kt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,10 @@ class VisitedEventListener(
5252
)
5353
logger.info("[VisitedEventListener] Increase point to user. username: \"$username\", point:\"${increaseContributionCount * 100}\"")
5454
}.onFailure {
55-
if (it !is IllegalArgumentException) {
56-
logger.error(
57-
"[VisitedEventListener] Cannot increase visit or point to user. username: \"${visited.username}\"", it
58-
)
59-
}
60-
if (it !is CannotAcquireLockException) {
61-
logger.warn("[VisitedEventListener] Deadlock found.", it)
55+
when (it) {
56+
is CannotAcquireLockException -> logger.warn("[VisitedEventListener] Deadlock found.", it)
57+
is IllegalArgumentException -> {} // DO NOTHING
58+
else -> logger.error("[VisitedEventListener] Cannot increase visit or point to user. username: \"${visited.username}\"", it)
6259
}
6360
}.also {
6461
MDC.remove(TRACE_ID)

0 commit comments

Comments
 (0)