You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2009/10/13 02:38:29 UTC

svn commit: r824554 - in /cxf/branches/2.2.x-fixes: ./ tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWSContainer.java

Author: dkulp
Date: Tue Oct 13 00:38:29 2009
New Revision: 824554

URL: http://svn.apache.org/viewvc?rev=824554&view=rev
Log:
Merged revisions 823970 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r823970 | cschneider | 2009-10-10 18:32:35 -0400 (Sat, 10 Oct 2009) | 1 line
  
  CXF-806 Show better error messages when java2ws fails
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWSContainer.java

Propchange: cxf/branches/2.2.x-fixes/
            ('svn:mergeinfo' removed)

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWSContainer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWSContainer.java?rev=824554&r1=824553&r2=824554&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWSContainer.java (original)
+++ cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/JavaToWSContainer.java Tue Oct 13 00:38:29 2009
@@ -83,10 +83,18 @@
             }
             throw ex;
         } catch (Exception ex) {
-            err.println("Error: " + ex.getMessage());
+            
+            // Try to find an exception with a message on the stack
+            Throwable e = ex.getCause();
+            while ((e.getMessage() == null || "".equals(e.getMessage())) && e.getCause() != null) {
+                e = e.getCause();
+            }
+            err.println("Error: " + e.toString());
             err.println();
             if (isVerboseOn()) {
                 ex.printStackTrace(err);
+            } else {
+                err.println("Use the verbose setting to show the stacktrace of this error");
             }
 
             throw new ToolException(ex.getMessage(), ex.getCause());