From: Andreas Kohlbecker Date: Thu, 27 Jan 2022 15:26:02 +0000 (+0100) Subject: fix #9931 catching unusaully fast thrown MailConnectExceptions in LoginPresenter X-Git-Tag: 5.29.0^2~10 X-Git-Url: https://dev.e-taxonomy.eu/gitweb/cdm-vaadin.git/commitdiff_plain/7eb38e5c44919144b6301e166ba99459acf33ad7 fix #9931 catching unusaully fast thrown MailConnectExceptions in LoginPresenter --- 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()