From 59ea5e1b7020d950750a84ec78c4dbf0464a0db6 Mon Sep 17 00:00:00 2001 From: BlubbFish Date: Mon, 1 Jan 2018 15:03:15 +0000 Subject: [PATCH] =?UTF-8?q?House-Dashboard=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IoT/Connector/ADataBackend.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/IoT/Connector/ADataBackend.cs b/IoT/Connector/ADataBackend.cs index 4df5ffc..4f43982 100644 --- a/IoT/Connector/ADataBackend.cs +++ b/IoT/Connector/ADataBackend.cs @@ -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) }).Invoke(new Object[] { settings }); }