From 2e9e0feb39c53a2acc990c6f0793b8d83e114d4d Mon Sep 17 00:00:00 2001 From: Yann Massard Date: Mon, 7 Oct 2024 14:21:30 +0200 Subject: [PATCH] Make sure we get exception logs even if the exception was not able to print its own stack trace (yes, that happened...) --- .../main/java/org/teamapps/ux/session/SessionContext.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/teamapps-ux/src/main/java/org/teamapps/ux/session/SessionContext.java b/teamapps-ux/src/main/java/org/teamapps/ux/session/SessionContext.java index cf8c5cace..fb4efd079 100644 --- a/teamapps-ux/src/main/java/org/teamapps/ux/session/SessionContext.java +++ b/teamapps-ux/src/main/java/org/teamapps/ux/session/SessionContext.java @@ -510,7 +510,11 @@ public CompletableFuture runWithContext(Callable callable, boolean for skipAutoUpdateNavigationHistoryStateOnce = false; return ((R) resultHolder[0]); } catch (Throwable t) { - LOGGER.error("Exception while executing within session context", t); + try { + LOGGER.error("Exception while executing within session context", t); + } catch (Throwable t2) { + LOGGER.error("Exception while executing within session context. WAS NOT ABLE TO LOG THE EXCEPTION of type {}!", t.getClass()); + } this.destroy(UiSessionClosingReason.SERVER_SIDE_ERROR); throw t; } finally {