Re-enable previous Error handling in RAP
[lgpl/argeo-commons.git] / swt / rap / org.argeo.cms.swt.rap / src / org / argeo / cms / web / CmsWebEntryPoint.java
index b3ca245ad76a819c98dc44e19ddcfd24af84850b..4d91cf8e20e8a163740f58e4deeecc39e50abfa1 100644 (file)
@@ -17,8 +17,8 @@ import org.argeo.api.cms.CmsLog;
 import org.argeo.api.cms.CmsSession;
 import org.argeo.api.cms.ux.CmsImageManager;
 import org.argeo.api.cms.ux.CmsView;
+import org.argeo.cms.CurrentUser;
 import org.argeo.cms.LocaleUtils;
-import org.argeo.cms.auth.CurrentUser;
 import org.argeo.cms.auth.RemoteAuthCallbackHandler;
 import org.argeo.cms.servlet.ServletHttpRequest;
 import org.argeo.cms.servlet.ServletHttpResponse;
@@ -167,10 +167,10 @@ public class CmsWebEntryPoint extends AbstractSwtCmsView implements EntryPoint,
                                return;
                }
                display.syncExec(() -> {
-//                     CmsFeedback.show("Unexpected exception in CMS", e);
-                       exception = e;
-                       log.error("Unexpected exception in CMS", e);
-                       doRefresh();
+                       // TODO internationalise
+                       CmsFeedback.error("Unexpected exception", e);
+                       // TODO report
+//                     doRefresh();
                });
        }
 
@@ -179,19 +179,19 @@ public class CmsWebEntryPoint extends AbstractSwtCmsView implements EntryPoint,
                        Subject.doAs(getSubject(), new PrivilegedAction<Void>() {
                                @Override
                                public Void run() {
-                                       if (exception != null) {
-                                               // TODO internationalise
-                                               CmsFeedback.show("Unexpected exception", exception);
-                                               exception = null;
-                                               // TODO report
-                                       }
+//                                     if (exception != null) {
+//                                             // TODO internationalise
+//                                             CmsFeedback.error("Unexpected exception", exception);
+//                                             exception = null;
+//                                             // TODO report
+//                                     }
                                        cmsWebApp.getCmsApp().refreshUi(ui, state);
                                        return null;
                                }
                        });
        }
 
-       /** Sets the state of the entry point and retrieve the related JCR node. */
+       /** Sets the state of the entry point and retrieve the related content. */
        protected String setState(String newState) {
                cmsWebApp.getCmsApp().setState(ui, newState);
                state = newState;
@@ -200,7 +200,7 @@ public class CmsWebEntryPoint extends AbstractSwtCmsView implements EntryPoint,
 
        @Override
        public void navigateTo(String state) {
-               exception = null;
+//             exception = null;
                String title = setState(state);
                if (title != null)
                        doRefresh();