You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by je...@locus.apache.org on 2000/02/07 18:16:28 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/readers UTF8Recognizer.java

jeffreyr    00/02/07 09:16:28

  Modified:    java/src/org/apache/xerces/readers UTF8Recognizer.java
  Log:
  Localized exception message
  
  Revision  Changes    Path
  1.2       +7 -4      xml-xerces/java/src/org/apache/xerces/readers/UTF8Recognizer.java
  
  Index: UTF8Recognizer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/readers/UTF8Recognizer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UTF8Recognizer.java	1999/11/09 01:12:39	1.1
  +++ UTF8Recognizer.java	2000/02/07 17:16:27	1.2
  @@ -83,6 +83,8 @@
                                                      boolean allowJavaEncodingName) throws Exception {
           XMLEntityHandler.EntityReader reader = null;
           byte b0 = data.byteAt(0);
  +        boolean debug = false;
  +
           if (b0 == '<') {
               int b1 = data.byteAt(1);
               if (b1 == '?') {
  @@ -118,7 +120,8 @@
                               } catch (UnsupportedEncodingException e) {
                                   throw new UnsupportedEncodingException(encname);
                               } catch (Exception e) {
  -                                e.printStackTrace();            // Internal Error
  +                                if( debug == true )
  +                                   e.printStackTrace();            // Internal Error
                               }
                           } else {
                               data.rewind();
  @@ -209,13 +212,13 @@
           // The rest of the methods in XMLReader are not used for parsing XMLDecl/TextDecl.
           //
           public void append(XMLEntityHandler.CharBuffer charBuffer, int offset, int length) {
  -            throw new RuntimeException("cannot happen 7");
  +            throw new RuntimeException("RDR002 cannot happen 7");
           }
           public int addString(int offset, int length) {
  -            throw new RuntimeException("cannot happen 8");
  +            throw new RuntimeException("RDR003 cannot happen 8");
           }
           public int addSymbol(int offset, int length) {
  -            throw new RuntimeException("cannot happen 9");
  +            throw new RuntimeException("RDR004 cannot happen 9");
           }
           public void skipToChar(char ch) throws IOException {
               throw new IOException("cannot happen 10");