System.Xml.Xsl.XslLoadException.XslLoadException C# (CSharp) Method

XslLoadException() private method

private XslLoadException ( CompilerError error ) : System.Diagnostics
error System.Xml.Xsl.Xslt.CompilerError
return System.Diagnostics
        internal XslLoadException(CompilerError error)
            : base(SR.Xml_UserException, new string[] { error.ErrorText })
        {
            int errorLine = error.Line;
            int errorColumn = error.Column;

            if (errorLine == 0)
            {
                // If the compiler reported error on Line 0 - ignore columns, 
                //   0 means it doesn't know where the error was and our SourceLineInfo
                //   expects either all zeroes or all non-zeroes
                errorColumn = 0;
            }
            else
            {
                if (errorColumn == 0)
                {
                    // In this situation the compiler returned for example Line 10, Column 0.
                    // This means that the compiler knows the line of the error, but it doesn't
                    //   know (or support) the column part of the location.
                    // Since we don't allow column 0 (as it's invalid), let's turn it into 1 (the begining of the line)
                    errorColumn = 1;
                }
            }

            SetSourceLineInfo(new SourceLineInfo(error.FileName, errorLine, errorColumn, errorLine, errorColumn));
        }

Same methods

XslLoadException::XslLoadException ( Exception inner, ISourceLineInfo lineInfo ) : System.Diagnostics
XslLoadException::XslLoadException ( string res ) : System.Diagnostics