nodeKind = defaultWorkspace.checkPath("", -1);
if (nodeKind == SVNNodeKind.NONE) {
SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.UNKNOWN,
"No entry at URL ''{0}''",
defaultWorkspace.getLocation().getPath());
throw new SVNException(error);
} else if (nodeKind == SVNNodeKind.UNKNOWN) {
SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.UNKNOWN,
"Entry at URL ''{0}'' is a file while directory was expected",
defaultWorkspace.getLocation().getPath());
throw new SVNException(error);
} else if (nodeKind == SVNNodeKind.FILE) {
SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.UNKNOWN,
"Entry at URL ''{0}'' is a file while directory was expected",
defaultWorkspace.getLocation().getPath());
throw new SVNException(error);
}
} catch (SVNException e) {
// deal with the exception
throw new RuntimeException(e);
}