fix #9931 catching unusaully fast thrown MailConnectExceptions in LoginPresenter
authorAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Thu, 27 Jan 2022 15:26:02 +0000 (16:26 +0100)
committerAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Thu, 27 Jan 2022 15:26:02 +0000 (16:26 +0100)
src/main/java/eu/etaxonomy/cdm/vaadin/view/LoginPresenter.java

index d49975427390549e3a80629725b918ff254d22ec..27e4973edac5bb651a97d53dc915a888bf072af1 100644 (file)
@@ -205,8 +205,8 @@ public class LoginPresenter extends AbstractPresenter<LoginView> 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<LoginView> 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()