X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fserializing%2FIndirectGUIComponentCreator.java;h=090ca86d6888651e9292daaea9c550293e97da7f;hb=026db85f46b6ea58e765ecff069545728eebdcac;hp=a7550b8cf9a6f565763337f1b3beb4206b41b4b4;hpb=d6702bcad356a28bc6c2eb0574d5cecdf536aabc;p=Mograsim.git diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/serializing/IndirectGUIComponentCreator.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/serializing/IndirectGUIComponentCreator.java index a7550b8c..090ca86d 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/serializing/IndirectGUIComponentCreator.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/serializing/IndirectGUIComponentCreator.java @@ -25,7 +25,7 @@ public class IndirectGUIComponentCreator static { - try (InputStream s = IndirectGUIComponentCreator.class.getResourceAsStream("./standardComponentIDMapping.json")) + try (InputStream s = IndirectGUIComponentCreator.class.getResourceAsStream("standardComponentIDMapping.json")) { if (s == null) throw new IOException("Resource not found"); @@ -99,6 +99,7 @@ public class IndirectGUIComponentCreator ComponentSupplier componentSupplier = componentSuppliers.get(className); if (componentSupplier != null) return componentSupplier.create(model, params, name); + throw new IllegalArgumentException("Component supplier not found for ID " + id + " (resolved: " + resolvedID + ")"); } else // we know id has to start with "file:" here // because standardComponentIDs only contains strings starting with "class:" or "file:"