private RelaxngException Error( RelaxngElementBase sourceObj, bool useReader, string message) { string msg = String.Concat( message, sourceObj != null ? String.Format(". Related schema component is {0} ({1}) line {2}, column {3}", sourceObj.BaseUri, sourceObj.GetType().Name, sourceObj.LineNumber, sourceObj.LinePosition) : String.Empty, useReader ? String.Format(". {0}", source.BaseURI) : String.Empty); IXmlLineInfo li = source as IXmlLineInfo; if (useReader && li != null && li.HasLineInfo()) { msg += String.Format(" line {0} column {1}", li.LineNumber, li.LinePosition); } return(new RelaxngException(msg)); }
// FIXME: should create another type of RelaxngException. private RelaxngException Error( RelaxngElementBase sourceObj, string message) { // This override is mainly for schema component error. return(Error(sourceObj, false, message)); }