Initial commit
[mono.git] / mcs / class / referencesource / mscorlib / system / security / xmlsyntaxexception.cs
1 // ==++==
2 // 
3 //   Copyright (c) Microsoft Corporation.  All rights reserved.
4 // 
5 // ==--==
6 // <OWNER>[....]</OWNER>
7 // 
8
9 namespace System.Security {
10     using System;
11     using System.Runtime.Serialization;
12     using System.Globalization;
13
14     [System.Runtime.InteropServices.ComVisible(true)]
15     [Serializable] sealed public class XmlSyntaxException : SystemException
16     {
17         public
18         XmlSyntaxException ()
19             : base (Environment.GetResourceString( "XMLSyntax_InvalidSyntax" ))
20         {
21             SetErrorCode(__HResults.CORSEC_E_XMLSYNTAX);
22         }
23
24         public
25         XmlSyntaxException (String message)
26             : base (message)
27         {
28             SetErrorCode(__HResults.CORSEC_E_XMLSYNTAX);
29         }
30
31         public
32         XmlSyntaxException (String message, Exception inner)
33             : base (message, inner)
34         {
35             SetErrorCode(__HResults.CORSEC_E_XMLSYNTAX);
36         }
37
38         public
39         XmlSyntaxException (int lineNumber)
40             : base (String.Format( CultureInfo.CurrentCulture, Environment.GetResourceString( "XMLSyntax_SyntaxError" ), lineNumber ) )
41         {
42             SetErrorCode(__HResults.CORSEC_E_XMLSYNTAX);
43         }
44
45         public
46         XmlSyntaxException( int lineNumber, String message )
47             : base( String.Format( CultureInfo.CurrentCulture, Environment.GetResourceString( "XMLSyntax_SyntaxErrorEx" ), lineNumber, message ) )
48         {
49             SetErrorCode(__HResults.CORSEC_E_XMLSYNTAX);
50         }
51
52         internal XmlSyntaxException(SerializationInfo info, StreamingContext context) : base(info, context)
53         {
54         }
55     }
56 }