From ea409952eab3759e00a8e75c77fc242701e89d43 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Mon, 4 Oct 2021 10:21:12 -0600 Subject: [PATCH] PrintComponent catch nonexistent component error --- projects/nat-archive-tool/src/nat/ArchiveController.kiss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/nat-archive-tool/src/nat/ArchiveController.kiss b/projects/nat-archive-tool/src/nat/ArchiveController.kiss index 2491a5b7..860fb9f7 100644 --- a/projects/nat-archive-tool/src/nat/ArchiveController.kiss +++ b/projects/nat-archive-tool/src/nat/ArchiveController.kiss @@ -194,7 +194,10 @@ (defCommand PrintComponent [entries (SelectedEntries null null) componentType (Text null)] - (doFor e entries (ui.displayMessage (dictGet e.components componentType))) []) + (doFor e entries + (if (e.components.exists componentType) + (ui.displayMessage (dictGet e.components componentType)) + (ui.displayMessage "Entry ${e.id} has no $componentType component"))) []) (defCommand CreateEntry [name (Text null)] [(archive.createEntry ->e