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)
35 : base (info, context)
37 this.lineNumber = info.GetInt32 ("lineNumber");
38 this.linePosition = info.GetInt32 ("linePosition");
41 internal XmlException (string message)
47 internal XmlException (string message, int lineNumber, int linePosition) : base (message)
49 this.lineNumber = lineNumber;
50 this.linePosition = linePosition;
57 public int LineNumber {
58 get { return lineNumber; }
61 public int LinePosition {
62 get { return linePosition; }
65 public override string Message {
73 public override void GetObjectData (SerializationInfo info, StreamingContext context)
75 base.GetObjectData (info, context);
76 info.AddValue ("lineNumber", lineNumber);
77 info.AddValue ("linePosition", linePosition);