Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)

124741 jkaabimofrad: RA-895: fixed the error message when the relativePath does not exist.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126582 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-05-10 11:38:47 +00:00
parent 1dc9ef8d8e
commit 80d27de1f8

View File

@@ -662,7 +662,6 @@ public class NodesImpl implements Nodes
*/ */
} }
FileInfo fileInfo = null; FileInfo fileInfo = null;
try try
{ {
@@ -675,14 +674,14 @@ public class NodesImpl implements Nodes
fileInfo = fileFolderService.getFileInfo(parentNodeRef); fileInfo = fileFolderService.getFileInfo(parentNodeRef);
if (fileInfo == null) if (fileInfo == null)
{ {
throw new FileNotFoundException(parentNodeRef); throw new EntityNotFoundException(parentNodeRef.getId());
} }
} }
} }
catch (FileNotFoundException fnfe) catch (FileNotFoundException fnfe)
{ {
// convert checked exception // convert checked exception
throw new EntityNotFoundException(parentNodeRef.getId()); throw new NotFoundException("The entity with relativePath: " + path + " was not found.");
} }
return fileInfo.getNodeRef(); return fileInfo.getNodeRef();