Implemented ability to send error data along with user feedback in case of error
[pithos-web-client] / src / gr / grnet / pithos / web / client / commands / ToTrashCommand.java
index a7411fc..614b8ed 100644 (file)
@@ -126,6 +126,7 @@ public class ToTrashCommand implements Command{
                                                                                        @Override
                                                                                        public void onError(Throwable t) {
                                                                            GWT.log("", t);
+                                                                                               app.setError(t);
                                                                            if (t instanceof RestException) {
                                                                                if (((RestException) t).getHttpStatusCode() == Response.SC_NOT_FOUND)
                                                                                        onSuccess(null);
@@ -152,6 +153,7 @@ public class ToTrashCommand implements Command{
                                        @Override
                                        public void onError(Throwable t) {
                                GWT.log("", t);
+                                               app.setError(t);
                                if (t instanceof RestException) {
                                    app.displayError("Unable to get folder: " + ((RestException) t).getHttpStatusText());
                                }
@@ -171,6 +173,7 @@ public class ToTrashCommand implements Command{
             @Override
             public void onError(Throwable t) {
                 GWT.log("", t);
+                               app.setError(t);
                 if (t instanceof RestException) {
                     app.displayError("Unable to create folder:" + ((RestException) t).getHttpStatusText());
                 }
@@ -205,6 +208,7 @@ public class ToTrashCommand implements Command{
                 @Override
                 public void onError(Throwable t) {
                     GWT.log("", t);
+                                       app.setError(t);
                     if (t instanceof RestException) {
                         app.displayError("Unable to copy file: " + ((RestException) t).getHttpStatusText());
                     }