ErrorEventArgs.cs 982 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace SuperSocket.Common
  6. {
  7. /// <summary>
  8. /// EventArgs for error and exception
  9. /// </summary>
  10. public class ErrorEventArgs : EventArgs
  11. {
  12. /// <summary>
  13. /// Gets the exception.
  14. /// </summary>
  15. public Exception Exception { get; private set; }
  16. /// <summary>
  17. /// Initializes a new instance of the <see cref="ErrorEventArgs"/> class.
  18. /// </summary>
  19. /// <param name="message">The message.</param>
  20. public ErrorEventArgs(string message)
  21. {
  22. Exception = new Exception(message);
  23. }
  24. /// <summary>
  25. /// Initializes a new instance of the <see cref="ErrorEventArgs"/> class.
  26. /// </summary>
  27. /// <param name="exception">The exception.</param>
  28. public ErrorEventArgs(Exception exception)
  29. {
  30. Exception = exception;
  31. }
  32. }
  33. }