Dont throw an exception if a variable can't be found in a table, instead just return nil

This commit is contained in:
Deukhoofd committed 2018-12-10 17:15:25 +01:00
1 parent 88e4b92b6a
commit f1d8904ec9
1 file changed
+1 -2
+1 -2
View File
@@ -27,7 +27,6 @@ namespace Upsilon.BaseTypes.ScriptTable
{
return o;
}
diagnostics.LogError($"Cannot find member '{s}' on Table", span);
return new ScriptNull();
}
@@ -48,7 +47,7 @@ namespace Upsilon.BaseTypes.ScriptTable
{
return result;
}
throw new Exception($"Can't find key '{index}' in table.");
return new ScriptNull();
}
public abstract IEnumerator<ScriptType> GetScriptEnumerator();