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

This commit is contained in:
Deukhoofd 2018-12-10 17:15:25 +01:00
parent 88e4b92b6a
commit f1d8904ec9
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 1 additions and 2 deletions

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();