Skip to content

Commit

Permalink
improve exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
shabanovd committed Feb 7, 2014
1 parent 8fc5b93 commit 51ec8d2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/org/exist/backup/restore/SystemImportHandler.java
Expand Up @@ -26,8 +26,8 @@
import org.w3c.dom.DocumentType;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.xml.sax.helpers.DefaultHandler;

import org.exist.Namespaces;
import org.exist.collections.Collection;
import org.exist.collections.IndexInfo;
Expand All @@ -45,7 +45,6 @@
import org.exist.xquery.value.DateTimeValue;

import java.net.URISyntaxException;

import java.util.Calendar;
import java.util.Date;
import java.util.Observable;
Expand All @@ -54,9 +53,9 @@
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.apache.log4j.Logger;
import org.exist.backup.BackupDescriptor;
import org.exist.backup.RestoreHandler;
import org.exist.backup.restore.listener.RestoreListener;
import org.exist.security.ACLPermission.ACE_ACCESS_TYPE;
import org.exist.security.ACLPermission.ACE_TARGET;
Expand Down Expand Up @@ -274,6 +273,8 @@ private void restoreSubCollectionEntry(Attributes atts) throws SAXException {

reader.setContentHandler(handler);
reader.parse(is);
} catch(final SAXParseException e) {
throw new SAXException("Could not process collection: " + descriptor.getSymbolicPath(name, false), e);
} catch(final ParserConfigurationException pce) {
throw new SAXException("Could not initalise SAXParser for processing sub-collection: " + descriptor.getSymbolicPath(name, false), pce);
} catch(final IOException ioe) {
Expand Down

0 comments on commit 51ec8d2

Please sign in to comment.