Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java @ 4062:145980c21700
Handle error conditions more robust.
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Mon, 08 Oct 2012 12:10:50 +0200 |
parents | ccac1279eb41 |
children | b3bc5e9ba912 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java Mon Oct 08 11:01:20 2012 +0200 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java Mon Oct 08 12:10:50 2012 +0200 @@ -104,9 +104,9 @@ protected List<String> openProjects; - protected String getExceptionString(Throwable caught) { + public static String getExceptionString(FLYSConstants msg, Throwable caught) { try { - return MSG.getString(caught.getMessage()); + return msg.getString(caught.getMessage()); } catch(MissingResourceException ex) { // There are some server error exceptions with @@ -162,7 +162,7 @@ @Override public void onFailure(Throwable caught) { GWT.log("Could not find a logged in user."); - String msg = getExceptionString(caught); + String msg = getExceptionString(MSG, caught); SC.warn(msg); } @@ -282,7 +282,7 @@ @Override public void onFailure(Throwable caught) { GWT.log("Could not recieve a list of rivers."); - SC.warn(getExceptionString(caught)); + SC.warn(getExceptionString(MSG, caught)); } @Override @@ -362,7 +362,7 @@ new AsyncCallback<Collection>() { @Override public void onFailure(Throwable caught) { - SC.warn(getExceptionString(caught)); + SC.warn(getExceptionString(MSG, caught)); } @Override @@ -399,7 +399,7 @@ @Override public void onFailure(Throwable caught) { unlockProject(collectionID); - SC.warn(getExceptionString(caught)); + SC.warn(getExceptionString(MSG, caught)); } @Override @@ -440,7 +440,7 @@ @Override public void onFailure(Throwable caught) { GWT.log("Could not create the new artifact."); - SC.warn(getExceptionString(caught)); + SC.warn(getExceptionString(MSG, caught)); } @Override @@ -470,7 +470,7 @@ @Override public void onFailure(Throwable caught) { GWT.log("Could not create new collection."); - SC.warn(getExceptionString(caught)); + SC.warn(getExceptionString(MSG, caught)); } @Override @@ -483,7 +483,7 @@ @Override public void onFailure(Throwable caught) { GWT.log("Could not create the new artifact."); - SC.warn(getExceptionString(caught)); + SC.warn(getExceptionString(MSG, caught)); } @Override