Permalink
Browse files

rhbz844509 - will fire notification if 'Show Error' is disabled

  • Loading branch information...
1 parent 5d2a5b2 commit 7fe7984fd2b96e354cbd513044957677269416cf @huangp huangp committed Sep 7, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 zanata-war/src/main/java/org/zanata/webtrans/client/Application.java
@@ -2,6 +2,7 @@
import org.zanata.common.LocaleId;
import org.zanata.webtrans.client.EventProcessor.StartCallback;
+import org.zanata.webtrans.client.events.NotificationEvent;
import org.zanata.webtrans.client.gin.WebTransGinjector;
import org.zanata.webtrans.client.presenter.AppPresenter;
import org.zanata.webtrans.client.rpc.NoOpAsyncCallback;
@@ -303,6 +304,7 @@ public void onUncaughtException(Throwable exception)
if (!injector.getUserConfig().isShowError())
{
+ injector.getEventBus().fireEvent(new NotificationEvent(NotificationEvent.Severity.Error, "There is an error occurred in the application. Please refresh your page and try again (enable the 'Show Error' option to show it)"));
return;
}
globalPopup.getCaption().setHTML("<div class=\"globalPopupCaption\">ERROR: " + e.getMessage() + "</div>");

0 comments on commit 7fe7984

Please sign in to comment.