cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Fixing a build failure on 2.7.x
Date Mon, 12 Jan 2015 17:42:26 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes b184d09ea -> 5b9c0aa0f


Fixing a build failure on 2.7.x


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5b9c0aa0
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5b9c0aa0
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5b9c0aa0

Branch: refs/heads/2.7.x-fixes
Commit: 5b9c0aa0f29578f6d94bc2448353c65b6355a5cf
Parents: b184d09
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Mon Jan 12 17:42:09 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Mon Jan 12 17:42:09 2015 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java     | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/5b9c0aa0/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java
index c700dd8..700468a 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java
@@ -19,6 +19,9 @@
 
 package org.apache.cxf.jaxrs.utils;
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.ext.ExceptionMapper;
@@ -34,6 +37,12 @@ public final class ExceptionUtils {
     private ExceptionUtils() {        
     }
     
+    public static String getStackTrace(Throwable ex) { 
+        StringWriter sw = new StringWriter();
+        ex.printStackTrace(new PrintWriter(sw));
+        return sw.toString();
+    }
+
     public static Class<?> getWebApplicationExceptionClass(Response exResponse,
                                                            Class<?> defaultExceptionType)
{
         return SpecExceptions.getWebApplicationExceptionClass(exResponse, defaultExceptionType);


Mime
View raw message