diff --git a/GHUI/BuildHtmlUiComponent.cs b/GHUI/BuildHtmlUiComponent.cs
index 4f19c85..0456c8c 100644
--- a/GHUI/BuildHtmlUiComponent.cs
+++ b/GHUI/BuildHtmlUiComponent.cs
@@ -56,6 +56,12 @@ protected override void SolveInstance(IGH_DataAccess da)
List jsScripts = new List();
if (!da.GetData(0, ref path)) return;
+ if(!System.IO.File.Exists(path))
+ {
+ AddRuntimeMessage(GH_RuntimeMessageLevel.Error, $"File path: \"{path}\" not found on this computer");
+ da.SetData(0, false);
+ return;
+ }
if (!da.GetData(1, ref htmlString)) return;
da.GetData(2, ref title);
da.GetDataList(3, stylesheets);
diff --git a/GHUI/Classes/WebView2Wrapper.cs b/GHUI/Classes/WebView2Wrapper.cs
index a9ca47f..01b0b98 100644
--- a/GHUI/Classes/WebView2Wrapper.cs
+++ b/GHUI/Classes/WebView2Wrapper.cs
@@ -248,6 +248,8 @@ private void OnDocumentUpdated(object sender, DOM.DocumentUpdatedEventArgs args)
///
public void SubscribeToHtmlChanged()
{
+ if (!System.IO.Directory.Exists(Directory))
+ throw new System.IO.DirectoryNotFoundException($"Can not find: \"{Directory}\" on this computer");
_watcher = new FileSystemWatcher(Directory)
{
NotifyFilter = NotifyFilters.LastAccess
diff --git a/GHUI/HtmlUiComponent.cs b/GHUI/HtmlUiComponent.cs
index 91ad4ff..66771f3 100644
--- a/GHUI/HtmlUiComponent.cs
+++ b/GHUI/HtmlUiComponent.cs
@@ -63,6 +63,11 @@ protected override void SolveInstance(IGH_DataAccess da)
// get input
if (!da.GetData(0, ref path)) return;
+ if (!System.IO.File.Exists(path))
+ {
+ AddRuntimeMessage(GH_RuntimeMessageLevel.Error, $"File path: \"{path}\" not found on this computer");
+ return;
+ }
if (!da.GetData(1, ref show)) return;
da.GetData(2, ref title);
da.GetData(3, ref _height);
diff --git a/GHUI/SettersDefineComponent.cs b/GHUI/SettersDefineComponent.cs
index 873469f..dd4e8b0 100644
--- a/GHUI/SettersDefineComponent.cs
+++ b/GHUI/SettersDefineComponent.cs
@@ -39,6 +39,12 @@ protected override void SolveInstance(IGH_DataAccess da)
if (!da.GetDataList(0, ids)) return;
if (!da.GetDataList(1, vals)) return;
+ if(ids.Count != vals.Count)
+ {
+ AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Amount of IDs and Values must be equal");
+ return;
+ }
+
//List setValueModels =
// ids.Select((t, i) => new DomSetValueModelGoo() {id = t, value = vals[i]}).ToList();
diff --git a/GHUI/Web UI/createdInput.html b/GHUI/Web UI/createdInput.html
index fc3e238..c816a8c 100644
--- a/GHUI/Web UI/createdInput.html
+++ b/GHUI/Web UI/createdInput.html
@@ -1 +1 @@
-
\ No newline at end of file
+