Merge pull request #347 from JamesB7/master
[mono.git] / mcs / class / System.XML / System.Xml.Xsl / XsltCompileException.cs
1 //\r
2 // System.Xml.Xsl.XsltCompileException.cs\r
3 //\r
4 // Authors:\r
5 //  Tim Coleman (tim@timcoleman.com)\r
6 //  Andreas Nahr (ClassDevelopment@A-SoftTech.com)\r
7 //\r
8 // (C) Copyright 2002 Tim Coleman\r
9 // (C) 2003 Andreas Nahr\r
10 // Copyright (C) 2005 Novell, Inc (http://www.novell.com)\r
11 //\r
12 // Permission is hereby granted, free of charge, to any person obtaining\r
13 // a copy of this software and associated documentation files (the\r
14 // "Software"), to deal in the Software without restriction, including\r
15 // without limitation the rights to use, copy, modify, merge, publish,\r
16 // distribute, sublicense, and/or sell copies of the Software, and to\r
17 // permit persons to whom the Software is furnished to do so, subject to\r
18 // the following conditions:\r
19 // \r
20 // The above copyright notice and this permission notice shall be\r
21 // included in all copies or substantial portions of the Software.\r
22 // \r
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
24 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
25 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
26 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
27 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
28 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
29 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
30 //\r
31 \r
32 using System.Runtime.Serialization;\r
33 using System.Xml.XPath;\r
34 using System.Security.Permissions;\r
35 \r
36 namespace System.Xml.Xsl\r
37 {\r
38         [Serializable]\r
39         public class XsltCompileException : XsltException\r
40         {\r
41                 #region Constructors\r
42 \r
43                 public XsltCompileException ()\r
44                 {\r
45                 }\r
46 \r
47                 public XsltCompileException (string message)\r
48                         : base (message)\r
49                 {\r
50                 }\r
51 \r
52                 public XsltCompileException (string message, Exception innerException)\r
53                         : base (message, innerException)\r
54                 {\r
55                 }\r
56 \r
57                 protected XsltCompileException (SerializationInfo info, StreamingContext context )\r
58                         : base (info, context)\r
59                 {\r
60                 }\r
61 \r
62                 public XsltCompileException (Exception inner, String sourceUri, int lineNumber, int linePosition)\r
63                         : base (lineNumber != 0 ? "{0} at {1}({2},{3}). See InnerException for details." : "{0}.",\r
64                                 "XSLT compile error", inner, lineNumber, linePosition, sourceUri)\r
65                 {\r
66                 }\r
67 \r
68                 internal XsltCompileException (string message, Exception innerException, XPathNavigator nav)\r
69                         : base (message, innerException, nav)\r
70                 {\r
71                 }\r
72                 #endregion\r
73 \r
74                 #region Methods\r
75 \r
76                 [SecurityPermission (SecurityAction.Demand, SerializationFormatter = true)]\r
77                 public override void GetObjectData (SerializationInfo info, StreamingContext context)\r
78                 {\r
79                         base.GetObjectData (info, context);\r
80                 }\r
81 \r
82                 #endregion\r
83         }\r
84 }\r