- throw new ArgeoJcrException("Migration of data model "
- + dataModelNodePath + " to " + targetVersion + " failed.",
- e);
+ throw new JcrException(
+ "Migration of data model " + dataModelNodePath + " to " + targetVersion + " failed.", e);
+ } catch (ParseException | IOException e) {
+ JcrUtils.discardQuietly(session);
+ throw new RuntimeException(
+ "Migration of data model " + dataModelNodePath + " to " + targetVersion + " failed.", e);