ExternalException.cs 959 B

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