Microsoft.JScript.Vsa.VsaEngine.CheckForErrors C# (CSharp) Method

CheckForErrors() private method

private CheckForErrors ( ) : void
return void
      internal void CheckForErrors(){
        if (!this.isClosed && !this.isEngineCompiled){
          SetUpCompilerEnvironment();
          Globals.ScopeStack.Push(this.GetGlobalScope().GetObject());
          try{
            foreach (Object item in this.vsaItems){
              if (item is VsaReference)
                ((VsaReference)item).Compile(); //Load the assembly into memory.
            }
            if (this.vsaItems.Count > 0) 
              this.SetEnclosingContext(new WrappedNamespace("", this)); //Provide a way to find types that are not inside of a name space
            foreach (Object item in this.vsaItems){
              if (!(item is VsaReference))
                ((VsaItem)item).CheckForErrors();
            }
            if (null != this.globalScope) 
              this.globalScope.CheckForErrors(); //In case the host added items to the global scope. 
          }finally{
            Globals.ScopeStack.Pop();
          }
        }
        this.globalScope = null;
      }