syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [1/3] syncope git commit: [SYNCOPE-603] Now raising an exception checked by console's exception reporting
Date Fri, 07 Nov 2014 08:35:27 GMT
Repository: syncope
Updated Branches:
  refs/heads/1_2_X ebfe1fbd5 -> 972f5dba1
  refs/heads/master 896607c7a -> d23a81ccd


[SYNCOPE-603] Now raising an exception checked by console's exception reporting


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/972f5dba
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/972f5dba
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/972f5dba

Branch: refs/heads/1_2_X
Commit: 972f5dba12c00012cd1fb23b0f3900c2a742cee5
Parents: ebfe1fb
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Fri Nov 7 09:35:03 2014 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Fri Nov 7 09:35:03 2014 +0100

----------------------------------------------------------------------
 .../apache/syncope/console/SyncopeApplication.java    | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/972f5dba/console/src/main/java/org/apache/syncope/console/SyncopeApplication.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/SyncopeApplication.java b/console/src/main/java/org/apache/syncope/console/SyncopeApplication.java
index c06831b..9aba5f7 100644
--- a/console/src/main/java/org/apache/syncope/console/SyncopeApplication.java
+++ b/console/src/main/java/org/apache/syncope/console/SyncopeApplication.java
@@ -43,6 +43,7 @@ import org.apache.wicket.Component;
 import org.apache.wicket.Page;
 import org.apache.wicket.RestartResponseAtInterceptPageException;
 import org.apache.wicket.Session;
+import org.apache.wicket.WicketRuntimeException;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.authorization.IUnauthorizedComponentInstantiationListener;
@@ -242,9 +243,16 @@ public class SyncopeApplication
 
             @Override
             public void onClick(final AjaxRequestTarget target) {
-                final UserTO userTO = SyncopeSession.get().isAuthenticated()
-                        ? userSelfRestClient.read()
-                        : new UserTO();
+                final UserTO userTO;
+                if (SyncopeSession.get().isAuthenticated()) {
+                    try {
+                        userTO = userSelfRestClient.read();
+                    } catch (Exception e) {
+                        throw new WicketRuntimeException(e);
+                    }
+                } else {
+                    userTO = new UserTO();
+                }
 
                 editProfileModalWin.setPageCreator(new ModalWindow.PageCreator() {
 


Mime
View raw message