diff flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java @ 215:e02f50a3ad59

Improved the exception handling of artifact / collection specific operations. Warning dialog are displayed after such an exception. flys-client/trunk@1657 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 08 Apr 2011 08:51:28 +0000
parents b92281182c6b
children a4a68b4ee2a3
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Fri Apr 08 08:45:15 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Fri Apr 08 08:51:28 2011 +0000
@@ -9,6 +9,7 @@
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.user.client.rpc.AsyncCallback;
 
+import com.smartgwt.client.util.SC;
 import com.smartgwt.client.widgets.Window;
 import com.smartgwt.client.widgets.layout.Layout;
 import com.smartgwt.client.widgets.layout.VLayout;
@@ -146,7 +147,7 @@
             new AsyncCallback<Collection>() {
                 public void onFailure(Throwable caught) {
                     GWT.log("Could not create the new collection.");
-                    GWT.log(caught.getMessage());
+                    SC.warn(messages.getString(caught.getMessage()));
                 }
 
                 public void onSuccess(Collection collection) {
@@ -158,7 +159,7 @@
 
                             public void onFailure(Throwable caught) {
                                 GWT.log("An error occured while adding artifact.");
-                                GWT.log(caught.getMessage());
+                                SC.warn(messages.getString(caught.getMessage()));
                             }
 
                             public void onSuccess(Collection newCollection) {
@@ -265,7 +266,7 @@
                 new AsyncCallback<Collection>() {
                     public void onFailure(Throwable caught) {
                         GWT.log("Could not DESCRIBE collection.");
-                        GWT.log(caught.getMessage());
+                        SC.warn(messages.getString(caught.getMessage()));
                     }
 
 

http://dive4elements.wald.intevation.org