directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1531581 - /directory/escimo/branches/json-schema-experiment/common/src/main/java/org/apache/directory/scim/ScimUtil.java
Date Sat, 12 Oct 2013 19:27:36 GMT
Author: kayyagari
Date: Sat Oct 12 19:27:35 2013
New Revision: 1531581

URL: http://svn.apache.org/r1531581
Log:
convert the stacktrace into a string 

Modified:
    directory/escimo/branches/json-schema-experiment/common/src/main/java/org/apache/directory/scim/ScimUtil.java

Modified: directory/escimo/branches/json-schema-experiment/common/src/main/java/org/apache/directory/scim/ScimUtil.java
URL: http://svn.apache.org/viewvc/directory/escimo/branches/json-schema-experiment/common/src/main/java/org/apache/directory/scim/ScimUtil.java?rev=1531581&r1=1531580&r2=1531581&view=diff
==============================================================================
--- directory/escimo/branches/json-schema-experiment/common/src/main/java/org/apache/directory/scim/ScimUtil.java
(original)
+++ directory/escimo/branches/json-schema-experiment/common/src/main/java/org/apache/directory/scim/ScimUtil.java
Sat Oct 12 19:27:35 2013
@@ -18,14 +18,30 @@
  */
 package org.apache.directory.scim;
 
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+
 /**
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class ScimUtil
 {
-    /*public static UserResource toUser( Entry entry )
+    public static String exceptionToStr( Exception e )
     {
+        StringWriter sw = new StringWriter();
+
+        PrintWriter pw = new PrintWriter( sw );
+
+        pw.write( e.getMessage() );
         
-    }*/
+        e.printStackTrace( pw );
+
+        pw.close();
+
+        return sw.toString();
+    }
+
 }



Mime
View raw message