Bike.Interpreter.Builtin.ErrorFactory.CreateNotDefinedError C# (CSharp) Method

CreateNotDefinedError() public static method

public static CreateNotDefinedError ( string varName ) : BikeObject
varName string
return BikeObject
        public static BikeObject CreateNotDefinedError(string varName)
        {
            return CreateErrorFromType("NotDefinedError", new BikeString(varName));
        }

Usage Example

Ejemplo n.º 1
0
        public virtual object Resolve(string name)
        {
            var scope = FindScopeFor(name);

            if (scope == null)
            {
                bool success;
                var  res = InterpretationContext.Instance.Interpreter
                           .TryInvokeMemberMissing(this, name, out success);
                if (success)
                {
                    return(res);
                }
                throw ErrorFactory.CreateNotDefinedError(name);
            }
            return(scope.Members[name]);
        }