throw new XPathException(this, "XMLDB exception caught: " + e.getMessage(), e);
}
} else {
try {
final CollectionManagementServiceImpl service = (CollectionManagementServiceImpl) collection.getService("CollectionManagementService", "1.0");
service.move(XmldbURI.xmldbUriFor(collection.getName()),
destination, null);
} catch (final XMLDBException e) {
logger.error(e.getMessage());
throw new XPathException(this, "Cannot move collection: " + e.getMessage(), e);