r23800 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23799‎ | r23800 | r23801 >
Date:21:01, 6 July 2007
Author:daniel
Status:old
Tags:
Comment:
exception chaining
Modified paths:
  • /trunk/mwdumper/src/org/mediawiki/dumper/Dumper.java (modified) (history)
  • /trunk/mwdumper/src/org/mediawiki/importer/XmlDumpReader.java (modified) (history)

Diff [purge]

Index: trunk/mwdumper/src/org/mediawiki/importer/XmlDumpReader.java
@@ -84,9 +84,9 @@
8585
8686 parser.parse(input, this);
8787 } catch (ParserConfigurationException e) {
88 - throw new IOException(e.getMessage());
 88+ throw (IOException)new IOException(e.getMessage()).initCause(e);
8989 } catch (SAXException e) {
90 - throw new IOException(e.getMessage());
 90+ throw (IOException)new IOException(e.getMessage()).initCause(e);
9191 }
9292 writer.close();
9393 }
@@ -202,7 +202,7 @@
203203 else if (qName == "namespaces") closeNamespaces();
204204 else if (qName == "namespace") closeNamespace();
205205 } catch (IOException e) {
206 - throw new SAXException(e);
 206+ throw (SAXException)new SAXException(e.getMessage()).initCause(e);
207207 }
208208 }
209209
Index: trunk/mwdumper/src/org/mediawiki/dumper/Dumper.java
@@ -223,7 +223,7 @@
224224 return new OutputWrapper(conn);
225225 } catch (Exception e) {
226226 //e.printStackTrace();
227 - throw new IOException(e.getMessage());
 227+ throw (IOException)new IOException(e.getMessage()).initCause(e);
228228 }
229229 }
230230

Status & tagging log