ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1574797 - in /ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest: RESTClientServlet.java RepositoryValueObject.java
Date Thu, 06 Mar 2014 08:26:03 GMT
Author: marrs
Date: Thu Mar  6 08:26:02 2014
New Revision: 1574797

URL: http://svn.apache.org/r1574797
Log:
ACE-458 Applied the patch with some changes: there were more locations where the error messages
could benefit from more information.

Modified:
    ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RESTClientServlet.java
    ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RepositoryValueObject.java

Modified: ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RESTClientServlet.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RESTClientServlet.java?rev=1574797&r1=1574796&r2=1574797&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RESTClientServlet.java
(original)
+++ ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RESTClientServlet.java
Thu Mar  6 08:26:02 2014
@@ -319,8 +319,8 @@ public class RESTClientServlet extends H
             resp.sendRedirect(req.getServletPath() + "/" + buildPathFromElements(WORK_FOLDER,
workspace.getSessionID(), entityType, object.getDefinition()));
         }
         catch (IllegalArgumentException e) {
-            m_logger.log(LogService.LOG_WARNING, "Failed to add entity of type: " + entityType,
e);
-            resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "Could not add entity of type
" + entityType);
+            m_logger.log(LogService.LOG_WARNING, "Failed to add entity of type: " + entityType
+ " with data: " + data);
+            resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "Could not add entity of type
" + entityType + " with data: " + data);
         }
     }
     
@@ -510,8 +510,8 @@ public class RESTClientServlet extends H
             resp.sendRedirect(req.getServletPath() + "/" + buildPathFromElements(WORK_FOLDER,
workspace.getSessionID(), entityType, entityId));
         }
         catch (IllegalArgumentException e) {
-            m_logger.log(LogService.LOG_WARNING, "Failed to update entity of type: " + entityType,
e);
-            resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "Could not update entity of
type " + entityType);
+            m_logger.log(LogService.LOG_WARNING, "Failed to update entity of type: " + entityType
+ " with data: " + data, e);
+            resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "Could not update entity of
type " + entityType + " with data: " + data);
         }
     }
 

Modified: ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RepositoryValueObject.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RepositoryValueObject.java?rev=1574797&r1=1574796&r2=1574797&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RepositoryValueObject.java
(original)
+++ ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RepositoryValueObject.java
Thu Mar  6 08:26:02 2014
@@ -26,4 +26,19 @@ import java.util.Map;
 public class RepositoryValueObject {
     public Map<String, String> attributes;
     public Map<String, String> tags;
+    
+    @Override
+    public String toString() {
+        StringBuffer sb = new StringBuffer(getClass().getSimpleName());
+        if (attributes != null) {
+        	sb.append(" with attributes [" + attributes.toString() + "]");
+        	if (tags != null) {
+        		sb.append(" and");
+        	}
+        }
+        if (tags != null) {
+        	sb.append(" with tags [" + tags.toString() + "]");
+        }
+        return sb.toString();
+    }
 }
\ No newline at end of file



Mime
View raw message