fix(ui): handle collection creation errors
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user