5 // Jason Diamond (jason@injektilo.org)
7 // (C) 2002 Jason Diamond http://injektilo.org/
11 using System.Runtime.Serialization;
16 public class XmlException : SystemException
20 string msg; // Cache message here because SystemException doesn't expose it
28 public XmlException (string message, Exception innerException)
29 : base (message, innerException)
34 protected XmlException (SerializationInfo info, StreamingContext context)
36 this.lineNumber = info.GetInt32 ("lineNumber");
37 this.linePosition = info.GetInt32 ("linePosition");
40 internal XmlException (string message)
46 internal XmlException (string message, int lineNumber, int linePosition) : base (message)
48 this.lineNumber = lineNumber;
49 this.linePosition = linePosition;
56 public int LineNumber {
57 get { return lineNumber; }
60 public int LinePosition {
61 get { return linePosition; }
64 public override string Message {
72 public override void GetObjectData (SerializationInfo info, StreamingContext context)
74 base.GetObjectData (info, context);
75 info.AddValue ("lineNumber", lineNumber);
76 info.AddValue ("linePosition", linePosition);