Changed buildNotification method that error log dosn't have to be displayed in all cases

Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com>
This commit is contained in:
Jonathan Philip Knoblauch
2016-08-08 16:15:55 +02:00
parent f3f9dbc665
commit 8a1207337b

View File

@@ -36,8 +36,6 @@ public class HawkbitUIErrorHandler extends DefaultErrorHandler {
@Override
public void error(final ErrorEvent event) {
LOG.error("Error in UI: ", event.getThrowable());
final Optional<Page> originError = getPageOriginError(event);
if (originError.isPresent()) {
@@ -72,7 +70,11 @@ public class HawkbitUIErrorHandler extends DefaultErrorHandler {
}
protected HawkbitErrorNotificationMessage buildNotification(final Throwable exception) {
LOG.error("Error in UI: ", exception);
return createHawkbitErrorNotificationMessage(exception);
}
protected HawkbitErrorNotificationMessage createHawkbitErrorNotificationMessage(final Throwable exception) {
final I18N i18n = SpringContextHelper.getBean(I18N.class);
return new HawkbitErrorNotificationMessage(STYLE, i18n.get("caption.error"),
i18n.get("message.error.temp", exception.getClass().getSimpleName()), false);