fix(ui): handle collection creation errors

This commit is contained in:
2026-09-03 19:31:19 +04:00
parent 32a456800d
commit 4bb9c7a89a
@@ -101,13 +101,17 @@ public class CreateCollectionMenu extends BaseModalWindow {
private void updateMainCollection() {
if (fillStrategy == null) {
MessageWindow.showModal(gui, "Сначала настройте способ заполнения.");
return;
}
try {
state.setMainCollection(fillStrategy.create());
MessageWindow.showModal(gui, "Коллекция успешно создана.");
} catch (RuntimeException e) {
MessageWindow.showModal(gui, "Не удалось создать коллекцию.");
}
}
private String getFillMethodName(FillMethod fillMethod) {