cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/xpointer/parser XPointerFrameworkParser.java
Date Sun, 15 Feb 2004 10:06:53 GMT
bruno       2004/02/15 02:06:53

  Modified:    src/java/org/apache/cocoon/components/xpointer/parser
                        XPointerFrameworkParser.java
  Log:
  improved error handling
  
  Revision  Changes    Path
  1.6       +7 -1      cocoon-2.1/src/java/org/apache/cocoon/components/xpointer/parser/XPointerFrameworkParser.java
  
  Index: XPointerFrameworkParser.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/xpointer/parser/XPointerFrameworkParser.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XPointerFrameworkParser.java	24 Sep 2003 21:41:12 -0000	1.5
  +++ XPointerFrameworkParser.java	15 Feb 2004 10:06:53 -0000	1.6
  @@ -68,7 +68,13 @@
       public static XPointer parse(String xpointer) throws ParseException {
           XPointerFrameworkParser xfp =
               new XPointerFrameworkParser(new java.io.StringReader(xpointer));
  -        xfp.pointer();
  +        try {
  +            xfp.pointer();
  +        } catch (TokenMgrError e) {
  +            // Rethrow TokenMgrErrors as ParseExceptions, because errors aren't caught
by Cocoon,
  +            // and mistyping in a xpointer isn't such a grave error
  +            throw new ParseException(e.getMessage());
  +        }
           return xfp.getXPointer();
       }
   
  
  
  

Mime
View raw message