Merge pull request #185 from QuickJack/master
[mono.git] / mcs / class / System.XML / System.Xml.XPath / XPathException.cs
index 33166fc3d4fb26b5f928f4f9471a37bc3620b149..ef600f469645c4bc373801cfe5791827da567be7 100644 (file)
@@ -5,8 +5,7 @@
 //   Tim Coleman (tim@timcoleman.com)
 //
 // (C) Copyright 2002 Tim Coleman
-//
-
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -29,6 +28,7 @@
 //
 
 using System.Runtime.Serialization;
+using System.Security.Permissions;
 
 namespace System.Xml.XPath
 {
@@ -37,26 +37,39 @@ namespace System.Xml.XPath
        {
 #region Constructors
 
+#if NET_2_0
+               public XPathException ()
+                       : base ("")
+               {
+               }
+#endif
+
                protected XPathException (SerializationInfo info, StreamingContext context) : base (info, context) {}
 
                public XPathException (string message, Exception innerException) : base (message, innerException) {}
 
-               internal XPathException (string message) : base (message, null) {}
+#if NET_2_0
+               public XPathException (string message)
+#else
+               internal XPathException (string message)
+#endif
+                       : base (message, null)
+               {
+               }
 
 #endregion
 
 #region Properties
 
                public override string Message {
-
                        get { return base.Message; }
-
                }
 
 #endregion
 
 #region Methods
 
+               [SecurityPermission (SecurityAction.Demand, SerializationFormatter = true)]
                public override void GetObjectData (SerializationInfo info, StreamingContext context)
                {
                        base.GetObjectData (info, context);