Skip to content

Commit 2bbdb34

Browse files
authored
Merge pull request #1164 from yue9944882/process-listener-error-mesg
Chore: Better error messages - save the exception tracestack context
2 parents bd54347 + 8400bdb commit 2bbdb34

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

util/src/main/java/io/kubernetes/client/informer/cache/ProcessorListener.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void run() {
6262
(ApiType) notification.getOldObj(), (ApiType) notification.getNewObj());
6363
} catch (Throwable t) {
6464
// Catch all exceptions here so that listeners won't quit unexpectedly
65-
log.error("failed invoking UPDATE event handler: {}", t.getMessage());
65+
log.error("failed invoking UPDATE event handler: {}", t);
6666
continue;
6767
}
6868
} else if (obj instanceof AddNotification) {
@@ -71,7 +71,7 @@ public void run() {
7171
this.handler.onAdd((ApiType) notification.getNewObj());
7272
} catch (Throwable t) {
7373
// Catch all exceptions here so that listeners won't quit unexpectedly
74-
log.error("failed invoking ADD event handler: {}", t.getMessage());
74+
log.error("failed invoking ADD event handler: {}", t);
7575
continue;
7676
}
7777
} else if (obj instanceof DeleteNotification) {
@@ -85,14 +85,14 @@ public void run() {
8585
}
8686
} catch (Throwable t) {
8787
// Catch all exceptions here so that listeners won't quit unexpectedly
88-
log.error("failed invoking DELETE event handler: {}", t.getMessage());
88+
log.error("failed invoking DELETE event handler: {}", t);
8989
continue;
9090
}
9191
} else {
9292
throw new BadNotificationException("unrecognized notification");
9393
}
9494
} catch (InterruptedException e) {
95-
log.error("processor interrupted: {}", e.getMessage());
95+
log.error("processor interrupted: {}", e);
9696
return;
9797
}
9898
}

0 commit comments

Comments
 (0)