https://bugzilla.wikimedia.org/show_bug.cgi?id=22137





--- Comment #1 from Kelson [Emmanuel Engelhart] <emman...@engelhart.org>  
2010-01-18 10:59:50 UTC ---
Hier is a diff adding column and line information to the exception
informations:

===================================================================
--- src/org/mediawiki/importer/XmlDumpReader.java       (révision 61197)
+++ src/org/mediawiki/importer/XmlDumpReader.java       (copie de travail)
@@ -36,6 +36,7 @@
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
+import org.xml.sax.SAXParseException;

 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
@@ -82,15 +83,17 @@
         */
        public void readDump() throws IOException {
                try {
-                       SAXParserFactory factory =
SAXParserFactory.newInstance();
-                       SAXParser parser = factory.newSAXParser();
+                   SAXParserFactory factory = SAXParserFactory.newInstance();
+                   SAXParser parser = factory.newSAXParser();

                        parser.parse(input, this);
                } catch (ParserConfigurationException e) {
                        throw (IOException)new
IOException(e.getMessage()).initCause(e);
+               } catch (SAXParseException e) {
+                   throw (IOException)new IOException(e.getMessage() + "
(line: " + e.getLineNumber() + " column: " + e.getColumnNumber() +
")").initCause(e);
                } catch (SAXException e) {
-                       throw (IOException)new
IOException(e.getMessage()).initCause(e);
-               }
+                   throw (IOException)new
IOException(e.getMessage()).initCause(e);
+               }
                writer.close();
        }


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to