- if (getUri() == null || isReadOnly())
- throw new UserDirectoryException("Cannot save LDIF user admin");
+ if (getUri() == null)
+ throw new UserDirectoryException(
+ "Cannot save LDIF user admin: no URI is set");
+ if (isReadOnly())
+ throw new UserDirectoryException("Cannot save LDIF user admin: "
+ + getUri() + " is read-only");