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/src/java/org/apache/commons/jelly JellyContext.java
Date Sun, 05 Sep 2004 11:14:23 GMT
dion        2004/09/05 04:14:23

  Modified:    jelly/src/java/org/apache/commons/jelly JellyContext.java
  Log:
  Factor out constant
  
  Revision  Changes    Path
  1.55      +9 -7      jakarta-commons/jelly/src/java/org/apache/commons/jelly/JellyContext.java
  
  Index: JellyContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/JellyContext.java,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- JellyContext.java	30 Aug 2004 02:16:37 -0000	1.54
  +++ JellyContext.java	5 Sep 2004 11:14:23 -0000	1.55
  @@ -88,7 +88,9 @@
        */
       protected boolean useContextClassLoader = false;
   
  -
  +    /** String used to denote a script can't be parsed */
  +    private static final String BAD_PARSE = "Could not parse Jelly script";
  +    
       public JellyContext() {
           this.currentURL = rootURL;
           init();
  @@ -440,9 +442,9 @@
           try {
               script = parser.parse(in);
           } catch (IOException e) {
  -            throw new JellyException("Could not parse Jelly script",e);
  +            throw new JellyException(JellyContext.BAD_PARSE, e);
           } catch (SAXException e) {
  -            throw new JellyException("Could not parse Jelly script",e);
  +            throw new JellyException(JellyContext.BAD_PARSE, e);
           }
           
           return script.compile();
  @@ -460,9 +462,9 @@
           try {
               script = parser.parse(url.toString());
           } catch (IOException e) {
  -            throw new JellyException("Could not parse Jelly script",e);
  +            throw new JellyException(JellyContext.BAD_PARSE, e);
           } catch (SAXException e) {
  -            throw new JellyException("Could not parse Jelly script",e);
  +            throw new JellyException(JellyContext.BAD_PARSE, e);
           }
           
           return script.compile();
  @@ -480,9 +482,9 @@
           try {
               script = parser.parse(source);
           } catch (IOException e) {
  -            throw new JellyException("Could not parse Jelly script",e);
  +            throw new JellyException(JellyContext.BAD_PARSE, e);
           } catch (SAXException e) {
  -            throw new JellyException("Could not parse Jelly script",e);
  +            throw new JellyException(JellyContext.BAD_PARSE, e);
           }
           
           return script.compile();
  
  
  

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