Refactor WebDav implementation
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / acr / directory / DirectoryContentProvider.java
index f4a416aa7bdfefcf38faf4126f249c4bca3638c8..aab5d6dc06a56ab69cdd533a800450c38f01c8a9 100644 (file)
@@ -48,7 +48,8 @@ public class DirectoryContentProvider implements ContentProvider {
                        }
                }
                if (userDirectory == null)
-                       throw new ContentNotFoundException("Cannot find user directory " + userDirectoryName);
+                       throw new ContentNotFoundException(session, mountPath + "/" + relativePath,
+                                       "Cannot find user directory " + userDirectoryName);
                if (segments.size() == 1) {
                        return new DirectoryContent(session, this, userDirectory);
                } else {
@@ -71,7 +72,8 @@ public class DirectoryContentProvider implements ContentProvider {
                        }
                        HierarchyUnit hierarchyUnit = userDirectory.getHierarchyUnit(pathWithinUserDirectory);
                        if (hierarchyUnit == null)
-                               throw new ContentNotFoundException(
+                               throw new ContentNotFoundException(session,
+                                               mountPath + "/" + relativePath + "/" + pathWithinUserDirectory,
                                                "Cannot find " + pathWithinUserDirectory + " within " + userDirectoryName);
                        return new HierarchyUnitContent(session, this, hierarchyUnit);
                }