House-Dashboard hinzugefügt

This commit is contained in:
BlubbFish 2018-01-01 15:03:15 +00:00
parent 2eb8ed1fab
commit 59ea5e1b70

View File

@ -17,7 +17,11 @@ namespace BlubbFish.Utils.IoT.Connector {
try {
t = Type.GetType(object_sensor, true);
} catch (TypeLoadException) {
throw new ArgumentException("settings.ini: " + settings["type"] + " is not a DataBackend");
Console.Error.WriteLine("settings.ini: " + settings["type"] + " is not a DataBackend");
return null;
} catch(System.IO.FileNotFoundException) {
Console.Error.WriteLine("Driver " + settings["type"] + " could not load!");
return null;
}
return (ADataBackend)t.GetConstructor(new Type[] { typeof(Dictionary<String, String>) }).Invoke(new Object[] { settings });
}