Dont throw an exception if a variable can't be found in a table, instead just return nil
This commit is contained in:
parent
88e4b92b6a
commit
f1d8904ec9
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue