commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/jelly/jelly-tags/validate/src/java/org/apache/commons/jelly/tags/validate VerifierTag.java
Date Sun, 20 Apr 2003 04:11:16 GMT
dion        2003/04/19 21:11:15

  Modified:    jelly/jelly-tags/validate/src/java/org/apache/commons/jelly/tags/validate
                        VerifierTag.java
  Log:
  Handle exceptions properly
  
  Revision  Changes    Path
  1.6       +11 -6     jakarta-commons/jelly/jelly-tags/validate/src/java/org/apache/commons/jelly/tags/validate/VerifierTag.java
  
  Index: VerifierTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/validate/src/java/org/apache/commons/jelly/tags/validate/VerifierTag.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- VerifierTag.java	20 Apr 2003 04:07:26 -0000	1.5
  +++ VerifierTag.java	20 Apr 2003 04:11:14 -0000	1.6
  @@ -64,6 +64,7 @@
   import java.io.ByteArrayInputStream;
   import java.io.File;
   import java.io.FileInputStream;
  +import java.io.FileNotFoundException;
   import java.io.InputStream;
   import java.io.IOException;
   
  @@ -115,7 +116,11 @@
                   throw new JellyTagException( "Could not find resource for uri: " + uri
);
               }
           } else if (file != null) {
  -        	in = new FileInputStream(file);
  +        	try {
  +	        	in = new FileInputStream(file);
  +        	} catch (FileNotFoundException e) {
  +        		throw new JellyTagException(e);
  +        	}
           } else {
               String text = getBodyText();
               in = new ByteArrayInputStream( text.getBytes() );
  
  
  

---------------------------------------------------------------------
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