Skip to content

Commit 25e3cc7

Browse files
authored
Merge branch 'main' into chore/add-client-id-for-ror-repository
2 parents 588303e + 2b24daa commit 25e3cc7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

user-interface/src/main/java/life/qbic/datamanager/exceptionhandling/UiExceptionHandler.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import com.vaadin.flow.component.UI;
88
import com.vaadin.flow.component.html.Span;
99
import com.vaadin.flow.server.ErrorEvent;
10+
import java.net.InetAddress;
11+
import java.net.UnknownHostException;
1012
import life.qbic.application.commons.ApplicationException;
1113
import life.qbic.datamanager.exceptionhandling.ErrorMessageTranslationService.UserFriendlyErrorMessage;
1214
import life.qbic.datamanager.views.notifications.NotificationDialog;
@@ -46,7 +48,12 @@ public UiExceptionHandler(
4648
*/
4749
public void error(ErrorEvent errorEvent, UI ui) {
4850
var throwable = errorEvent.getThrowable();
49-
log.error(throwable.getMessage(), throwable);
51+
try {
52+
String hostAddress = InetAddress.getLocalHost().getHostAddress();
53+
log.error("[%s]".formatted(hostAddress) + throwable.getMessage(), throwable);
54+
} catch (UnknownHostException ignored) {
55+
log.error(throwable.getMessage(), throwable);
56+
}
5057
ApplicationException applicationException = ApplicationException.wrapping(throwable);
5158
displayUserFriendlyMessage(ui, applicationException);
5259
}

0 commit comments

Comments
 (0)