From 7eb38e5c44919144b6301e166ba99459acf33ad7 Mon Sep 17 00:00:00 2001 From: Andreas Kohlbecker Date: Thu, 27 Jan 2022 16:26:02 +0100 Subject: [PATCH] fix #9931 catching unusaully fast thrown MailConnectExceptions in LoginPresenter --- .../eu/etaxonomy/cdm/vaadin/view/LoginPresenter.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/LoginPresenter.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/LoginPresenter.java index d4997542..27e4973e 100644 --- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/LoginPresenter.java +++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/LoginPresenter.java @@ -205,8 +205,8 @@ public class LoginPresenter extends AbstractPresenter implements Even } catch (InterruptedException e) { asyncTimeout = true; } catch (Exception e) { - // in case executing getUserNameOrEmail() causes an exeption faster - // than futureResult.addCallback( can be processed, the execption + // in case executing getUserNameOrEmail() causes an exception faster + // than futureResult.addCallback( can be processed, the exception // can not be caught asynchronously // so we are adding all these exceptions here asyncException.add(e); @@ -268,6 +268,12 @@ public class LoginPresenter extends AbstractPresenter implements Even result = futureResult.get(); } catch (InterruptedException e) { asyncTimeout = true; + } catch (Exception e) { + // in case executing emailAccountRegistrationRequest() causes an exception faster + // than futureResult.addCallback( can be processed, the exception + // can not be caught asynchronously + // so we are adding all these exceptions here + asyncException.add(e); } if(!asyncException.isEmpty()) { getView().getLoginDialog().getRegisterMessageLabel() -- 2.34.1