You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2014/02/25 14:17:17 UTC
svn commit: r1571679 -
/axis/axis1/java/trunk/axis-rt-core/src/main/java/org/apache/axis/wsdl/gen/Parser.java
Author: veithen
Date: Tue Feb 25 13:17:16 2014
New Revision: 1571679
URL: http://svn.apache.org/r1571679
Log:
Ensure that the wsdl2java Ant task correctly reports any kind of failure, not only failures that trigger a java.lang.Exception, but also failures that trigger a java.lang.Error.
Modified:
axis/axis1/java/trunk/axis-rt-core/src/main/java/org/apache/axis/wsdl/gen/Parser.java
Modified: axis/axis1/java/trunk/axis-rt-core/src/main/java/org/apache/axis/wsdl/gen/Parser.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/axis-rt-core/src/main/java/org/apache/axis/wsdl/gen/Parser.java?rev=1571679&r1=1571678&r2=1571679&view=diff
==============================================================================
--- axis/axis1/java/trunk/axis-rt-core/src/main/java/org/apache/axis/wsdl/gen/Parser.java (original)
+++ axis/axis1/java/trunk/axis-rt-core/src/main/java/org/apache/axis/wsdl/gen/Parser.java Tue Feb 25 13:17:16 2014
@@ -345,7 +345,14 @@ public class Parser {
}
if (runnable.getFailure() != null) {
- throw runnable.getFailure();
+ Throwable failure = runnable.getFailure();
+ if (failure instanceof Exception) {
+ throw (Exception)failure;
+ } else if (failure instanceof Error){
+ throw (Error)failure;
+ } else {
+ throw new Error(failure);
+ }
}
} // run
@@ -363,7 +370,7 @@ public class Parser {
private String wsdlURI;
/** Field failure */
- private Exception failure = null;
+ private Throwable failure = null;
/**
* Constructor WSDLRunnable
@@ -384,7 +391,7 @@ public class Parser {
try {
symbolTable.populate(wsdlURI, username, password);
generate(symbolTable);
- } catch (Exception e) {
+ } catch (Throwable e) {
failure = e;
}
} // run
@@ -394,7 +401,7 @@ public class Parser {
*
* @return
*/
- public Exception getFailure() {
+ public Throwable getFailure() {
return failure;
} // getFailure
} // WSDLRunnable