summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library/jvm/scala/xml/include/parsing/FactoryAdapter.scala30
1 files changed, 5 insertions, 25 deletions
diff --git a/src/library/jvm/scala/xml/include/parsing/FactoryAdapter.scala b/src/library/jvm/scala/xml/include/parsing/FactoryAdapter.scala
index 4b8ca9f9cc..32c58c3ff6 100644
--- a/src/library/jvm/scala/xml/include/parsing/FactoryAdapter.scala
+++ b/src/library/jvm/scala/xml/include/parsing/FactoryAdapter.scala
@@ -284,34 +284,14 @@ abstract class FactoryAdapter extends DefaultHandler() {
} catch {
case e: Exception =>
Console.err.println("error: Unable to instantiate parser")
- exit(1)
+ throw e
}
// parse file
- //try {
- //Console.err.println("[parsing \"" + source + "\"]");
- scopeStack.push(TopScope)
- parser.parse(source, this)
- scopeStack.pop
- /*
- } catch {
- case ( e:SAXParseException ) => {
- // ignore
- }
- case ( e:Exception ) => {
- Console.err.println("error: Parse error occurred - " + e.getMessage());
- if (e.isInstanceOf[ SAXException ]) {
- (e.asInstanceOf[ SAXException ])
- .getException()
- .printStackTrace( System.err );
- } else {
- e.printStackTrace(System.err);
- }
- }
- } // catch
-*/
- //Console.err.println("[FactoryAdapter: total #elements = "+elemCount+"]");
- rootElem
+ scopeStack.push(TopScope)
+ parser.parse(source, this)
+ scopeStack.pop
+ return rootElem
} // loadXML
/** loads XML from given file */