node.remove();
session.save();
} catch (PathNotFoundException e) {
String errorMessage = "Attempt to remove non-existing object with key: " + key;
LOG.log(Level.WARNING, errorMessage);
throw new ObjectNotFoundException(errorMessage);
} catch (RepositoryException e) {
String errorMessage = "Attempt to remove object with key: " + key + " failed. "
+ "RepositoryException. Error message is: " + e.getMessage();
LOG.log(Level.WARNING, errorMessage);
throw new PersistencyException(errorMessage);