System.Xml.Xsl.IlGen.XmlILVisitor.VisitError C# (CSharp) Method

VisitError() protected method

Generate code for QilNodeType.Error.
protected VisitError ( QilUnary ndErr ) : QilNode
ndErr System.Xml.Xsl.Qil.QilUnary
return QilNode
        protected override QilNode VisitError(QilUnary ndErr) {
            // XmlQueryRuntime.ThrowException(strErr);
            this.helper.LoadQueryRuntime();
            NestedVisitEnsureStack(ndErr.Child);
            this.helper.Call(XmlILMethods.ThrowException);

            if (XmlILConstructInfo.Read(ndErr).ConstructMethod == XmlILConstructMethod.Writer) {
                this.iterCurr.Storage = StorageDescriptor.None();
            }
            else {
                // Push dummy value so that Location is not None and IL rules are met
                this.helper.Emit(OpCodes.Ldnull);
                this.iterCurr.Storage = StorageDescriptor.Stack(typeof(XPathItem), false);
            }

            return ndErr;
        }
XmlILVisitor