Fri Jun 14 16:18:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
[mono.git] / mcs / class / corlib / System.Runtime.InteropServices / ExternalException.cs
1 //
2 // System.Runtime.InteropServices.ExternalException.cs
3 //
4 // Author:
5 //   Miguel De Icaza (miguel@ximian.com)
6 //
7 // (C) 2001 Ximian, Inc.  http://www.ximian.com
8 //
9
10 using System.Runtime.Serialization;
11 using System.Globalization;
12
13 namespace System.Runtime.InteropServices {
14         [Serializable]
15         public class ExternalException : SystemException {
16                 private int error_code;
17                 
18                 // Constructors
19                 public ExternalException ()
20                         : base (Locale.GetText ("External exception"))
21                 {
22                 }
23
24                 public ExternalException (string message)
25                         : base (message)
26                 {
27                 }
28
29                 protected ExternalException(SerializationInfo info, StreamingContext context)
30                         : base (info, context) {
31                 }
32                 
33                 public ExternalException (string message, Exception inner)
34                         : base (message, inner)
35                 {
36                 }
37
38                 public ExternalException (string message, int errorCode)
39                         : base (message)
40                 {
41                         error_code = errorCode;
42                 }
43
44                 public virtual int ErrorCode {
45                         get {
46                                 return error_code;
47                         }
48                 }
49         }
50 }