// -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- // // System.Xml.XmlException // // Author: // Daniel Weber (daniel-weber@austin.rr.com) // // (C) 2001 Daniel Weber using System; using System.Runtime.Serialization; namespace System.Xml { /// /// Abstract class XmlNodeList. /// public class XmlException : SystemException { // Private data members int FlineNumber; int FlinePosition; string Fmessage; // public properties /// /// Get the line number where the exception occured /// public int LineNumber { get { return FlineNumber; } } /// /// Get the line position where the exception occured. /// public int LinePosition { get { return FlinePosition; } } /// /// Get the error message describing the exception. /// public override string Message { get { return Fmessage; } } // Public Methods // Constructors /// /// Create a new XmlException object. /// /// The serializatin object holding all exception information. /// The streaming context containing the context of the error public XmlException( SerializationInfo info, StreamingContext context ) { FlineNumber = info.GetInt32("lineNumber"); FlinePosition = info.GetInt32("linePosition"); Fmessage = info.GetString("message"); } /// /// Create a new XmlException /// /// Description of error /// Exception causing error. Value can be null. public XmlException( string message, Exception innerException ) { Fmessage = message; } internal XmlException( string message, XmlInputSource src) { FlineNumber = src.lineNumber; FlinePosition = src.columnNumber; Fmessage = message; } } }