commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nutty...@apache.org
Subject svn commit: r441275 - /jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/
Date Thu, 07 Sep 2006 22:34:03 GMT
Author: nuttycom
Date: Thu Sep  7 15:34:02 2006
New Revision: 441275

URL: http://svn.apache.org/viewvc?view=rev&rev=441275
Log:
Modified to throw StageExceptions with source stage reference

Modified:
    jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/DynamicLookupStaticMethodStage.java
    jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/FtpFileDownloadStage.java
    jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/HttpFileDownloadStage.java
    jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/InputStreamLineBreakStage.java
    jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/InvokeMethodStage.java
    jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/InvokeStaticMethodStage.java
    jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/PipelineShutdownStage.java
    jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/URLToInputStreamStage.java

Modified: jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/DynamicLookupStaticMethodStage.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/DynamicLookupStaticMethodStage.java?view=diff&rev=441275&r1=441274&r2=441275
==============================================================================
--- jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/DynamicLookupStaticMethodStage.java
(original)
+++ jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/DynamicLookupStaticMethodStage.java
Thu Sep  7 15:34:02 2006
@@ -107,11 +107,11 @@
             for (Class<?> clazz : argTypes) message.append(clazz.getName()).append("
");
             message.append("]");
             
-            throw new StageException(message.toString() ,e);
+            throw new StageException(this, message.toString() ,e);
         } catch (IllegalAccessException e){
-            throw new StageException(e);
+            throw new StageException(this, e);
         } catch (InvocationTargetException e){
-            throw new StageException(e);
+            throw new StageException(this, e);
         }
     }
     

Modified: jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/FtpFileDownloadStage.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/FtpFileDownloadStage.java?view=diff&rev=441275&r1=441274&r2=441275
==============================================================================
--- jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/FtpFileDownloadStage.java
(original)
+++ jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/FtpFileDownloadStage.java
Thu Sep  7 15:34:02 2006
@@ -91,10 +91,10 @@
             client.login(user, password);
             log.debug(client.getReplyString());
             if(!FTPReply.isPositiveCompletion(client.getReplyCode())) {
-                throw new StageException("FTP login failed for user " + user + ": " + client.getReplyString());
+                throw new StageException(this, "FTP login failed for user " + user + ": "
+ client.getReplyString());
             }
         } catch (IOException e) {
-            throw new StageException(e.getMessage(), e);
+            throw new StageException(this, e.getMessage(), e);
         }
     }
     
@@ -105,7 +105,7 @@
      * @throws ClassCastException if the parameter obj is not an instance of java.net.URL
      */
     public void process(Object obj) throws StageException {
-        if (!this.fworkDir.exists()) throw new StageException("The work directory for file
download " + workDir.toString() + " does not exist.");
+        if (!this.fworkDir.exists()) throw new StageException(this, "The work directory for
file download " + workDir.toString() + " does not exist.");
         
         FileSpec spec = (FileSpec) obj;
         
@@ -122,7 +122,7 @@
             client.enterLocalPassiveMode();
             searchCurrentDirectory("", spec);
         } catch (IOException e) {
-            throw new StageException(e.getMessage(), e);
+            throw new StageException(this, e);
         }
     }
     

Modified: jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/HttpFileDownloadStage.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/HttpFileDownloadStage.java?view=diff&rev=441275&r1=441274&r2=441275
==============================================================================
--- jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/HttpFileDownloadStage.java
(original)
+++ jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/HttpFileDownloadStage.java
Thu Sep  7 15:34:02 2006
@@ -98,7 +98,7 @@
                 throw new IllegalArgumentException("Unrecognized parameter class to process()
for HttpFileDownload: " + obj.getClass().getName() + "; must be URL or String");
             }
         } catch (MalformedURLException e) {
-            throw new StageException("Malformed URL: " + obj.toString(), e);
+            throw new StageException(this, "Malformed URL: " + obj, e);
         }
         
         log.debug("Retrieving data from " + url.toString());
@@ -125,7 +125,7 @@
             }
              */
         } catch (IOException e) {
-            throw new StageException(e.getMessage(), e);
+            throw new StageException(this, e);
         }
         
         File workFile = null;
@@ -143,7 +143,7 @@
             out.close();
             in.close();
         } catch (IOException e) {
-            throw new StageException("An error occurred downloading a data file from " +
url.toString() + ": " + e.getMessage(), e);
+            throw new StageException(this, "An error occurred downloading a data file from
" + url.toString(), e);
         } finally {
             con.disconnect();
         }

Modified: jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/InputStreamLineBreakStage.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/InputStreamLineBreakStage.java?view=diff&rev=441275&r1=441274&r2=441275
==============================================================================
--- jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/InputStreamLineBreakStage.java
(original)
+++ jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/InputStreamLineBreakStage.java
Thu Sep  7 15:34:02 2006
@@ -55,7 +55,7 @@
                 line = buffered.readLine();
             }
         } catch (IOException e){
-            throw new StageException(e);
+            throw new StageException(this, e);
         }
     }
 

Modified: jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/InvokeMethodStage.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/InvokeMethodStage.java?view=diff&rev=441275&r1=441274&r2=441275
==============================================================================
--- jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/InvokeMethodStage.java
(original)
+++ jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/InvokeMethodStage.java
Thu Sep  7 15:34:02 2006
@@ -28,7 +28,7 @@
  * at the time of object construction.
  *
  *
- * @version $Id: InvokeMethodStage.java 3562 2006-08-03 20:54:13Z kjn $
+ * @version $Id: InvokeMethodStage.java 3742 2006-08-28 16:50:23Z kjn $
  */
 public class InvokeMethodStage extends BaseStage {
     private static final Log log = LogFactory.getLog(InvokeMethodStage.class);
@@ -86,9 +86,9 @@
             Object result = method.invoke(obj, arguments);
             this.emit(result);
         } catch (IllegalAccessException e){
-            throw new StageException(e);
+            throw new StageException(this, e);
         } catch (InvocationTargetException e){
-            throw new StageException(e);
+            throw new StageException(this, e);
         }
     }
 }

Modified: jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/InvokeStaticMethodStage.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/InvokeStaticMethodStage.java?view=diff&rev=441275&r1=441274&r2=441275
==============================================================================
--- jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/InvokeStaticMethodStage.java
(original)
+++ jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/InvokeStaticMethodStage.java
Thu Sep  7 15:34:02 2006
@@ -85,9 +85,9 @@
                 this.context.getBranchFeeder(nullResultBranchKey).feed(obj);
             }
         } catch (IllegalAccessException e){
-            throw new StageException(e);
+            throw new StageException(this, e);
         } catch (InvocationTargetException e){
-            throw new StageException(e);
+            throw new StageException(this, e);
         }       
     }
 

Modified: jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/PipelineShutdownStage.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/PipelineShutdownStage.java?view=diff&rev=441275&r1=441274&r2=441275
==============================================================================
--- jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/PipelineShutdownStage.java
(original)
+++ jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/PipelineShutdownStage.java
Thu Sep  7 15:34:02 2006
@@ -22,7 +22,6 @@
 /**
  *
  *
- * @version $Id: PipelineShutdownStage.java 3562 2006-08-03 20:54:13Z kjn $
  */
 public class PipelineShutdownStage extends BaseStage {
     

Modified: jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/URLToInputStreamStage.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/URLToInputStreamStage.java?view=diff&rev=441275&r1=441274&r2=441275
==============================================================================
--- jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/URLToInputStreamStage.java
(original)
+++ jakarta/commons/sandbox/pipeline/trunk/src/main/java/org/apache/commons/pipeline/stage/URLToInputStreamStage.java
Thu Sep  7 15:34:02 2006
@@ -54,7 +54,7 @@
             try {
                 url = new URL(urlString);
             } catch (MalformedURLException e){
-                throw new StageException("Error converting url String:" + urlString,e);
+                throw new StageException(this, "Error converting url String:" + urlString,
e);
             }
         }
         
@@ -64,7 +64,7 @@
             log.info("enqueing input stream");
             this.emit(inputStream);
         } catch (IOException e){
-            throw new StageException("Error with stream from url:" + url,e);
+            throw new StageException(this, "Error with stream from url:" + url, e);
         }
     }
     



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message