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=3e34976f926361e31d2da586c2c5208b549f4034;hp=a7550b8cf9a6f565763337f1b3beb4206b41b4b4;hpb=f0a19ba9d94937693b84c65c6c9236a37cf24224;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:"