1
0
mirror of https://github.com/fadden/6502bench.git synced 2025-09-14 08:24:43 +00:00

Add VisParamDescr default value type check

The VisParamDescrs specify a type and a default value.  If the value
has the wrong type, things would blow up in the editor.  We now
check the type at plugin load time, and refuse to load the plugin at
all if an entry has a bad type.
This commit is contained in:
Andy McFadden
2020-01-21 11:02:36 -08:00
parent b5deea713f
commit a0735826fb
3 changed files with 25 additions and 3 deletions

View File

@@ -118,7 +118,11 @@ namespace SourceGen.Sandbox {
report = new FileLoadReport(dllPath); // empty report
return true;
} else {
IPlugin plugin = DomainMgr.PluginMgr.LoadPlugin(dllPath, scriptIdent);
IPlugin plugin = DomainMgr.PluginMgr.LoadPlugin(dllPath, scriptIdent,
out string failMsg);
if (plugin == null) {
report.Add(FileLoadItem.Type.Error, "Failed loading plugin: " + failMsg);
}
return plugin != null;
}
}