Skip to content

Commit a721c32

Browse files
committed
Better max file in folder handling
1 parent 799e969 commit a721c32

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

logicaldoc-core/src/main/java/com/logicaldoc/core/document/TooManyDocumentsException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class TooManyDocumentsException extends PersistenceException {
1616
private final long folderId;
1717

1818
public TooManyDocumentsException(Folder folder, long max) {
19-
super(String.format("Folder %s (%d) cannot exceed the limit of %d documents configured in the settings",
19+
super(String.format("Folder %s [id=%d] cannot exceed the limit of %d documents configured in the settings",
2020
folder.getName(), folder.getId(), max));
2121
this.folderId = folder.getId();
2222
}

logicaldoc-webapp/src/main/java/com/logicaldoc/web/service/DocumentServiceImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
import com.logicaldoc.util.html.HTMLSanitizer;
122122
import com.logicaldoc.util.io.FileUtil;
123123
import com.logicaldoc.web.UploadServlet;
124+
import com.logicaldoc.web.websockets.WebsocketTool;
124125

125126
/**
126127
* The document service for the operations on the documents done through the
@@ -266,6 +267,7 @@ public List<GUIDocument> addDocuments(boolean importZip, String charset, boolean
266267
addDocuments(importZip, charset, immediateIndexing, metadata, session, createdDocs);
267268
} catch (ServerException | PersistenceException | ParsingException | IOException e) {
268269
log.error(e.getMessage(), e);
270+
new WebsocketTool().showMessage(session, e.getMessage(), "error");
269271
}
270272
}, session)) {
271273
return createdDocs;

0 commit comments

Comments
 (0)