File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
user-interface/src/main/java/life/qbic/datamanager/exceptionhandling Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 7
7
import com .vaadin .flow .component .UI ;
8
8
import com .vaadin .flow .component .html .Span ;
9
9
import com .vaadin .flow .server .ErrorEvent ;
10
+ import java .net .InetAddress ;
11
+ import java .net .UnknownHostException ;
10
12
import life .qbic .application .commons .ApplicationException ;
11
13
import life .qbic .datamanager .exceptionhandling .ErrorMessageTranslationService .UserFriendlyErrorMessage ;
12
14
import life .qbic .datamanager .views .notifications .NotificationDialog ;
@@ -46,7 +48,12 @@ public UiExceptionHandler(
46
48
*/
47
49
public void error (ErrorEvent errorEvent , UI ui ) {
48
50
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
+ }
50
57
ApplicationException applicationException = ApplicationException .wrapping (throwable );
51
58
displayUserFriendlyMessage (ui , applicationException );
52
59
}
You can’t perform that action at this time.
0 commit comments