Exceptions.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System;
  2. using System.Runtime.Serialization;
  3. namespace Amib.Threading
  4. {
  5. #region Exceptions
  6. /// <summary>
  7. /// Represents an exception in case IWorkItemResult.GetResult has been canceled
  8. /// </summary>
  9. public sealed partial class WorkItemCancelException : Exception
  10. {
  11. public WorkItemCancelException()
  12. {
  13. }
  14. public WorkItemCancelException(string message)
  15. : base(message)
  16. {
  17. }
  18. public WorkItemCancelException(string message, Exception e)
  19. : base(message, e)
  20. {
  21. }
  22. }
  23. /// <summary>
  24. /// Represents an exception in case IWorkItemResult.GetResult has been timed out
  25. /// </summary>
  26. public sealed partial class WorkItemTimeoutException : Exception
  27. {
  28. public WorkItemTimeoutException()
  29. {
  30. }
  31. public WorkItemTimeoutException(string message)
  32. : base(message)
  33. {
  34. }
  35. public WorkItemTimeoutException(string message, Exception e)
  36. : base(message, e)
  37. {
  38. }
  39. }
  40. /// <summary>
  41. /// Represents an exception in case IWorkItemResult.GetResult has been timed out
  42. /// </summary>
  43. public sealed partial class WorkItemResultException : Exception
  44. {
  45. public WorkItemResultException()
  46. {
  47. }
  48. public WorkItemResultException(string message)
  49. : base(message)
  50. {
  51. }
  52. public WorkItemResultException(string message, Exception e)
  53. : base(message, e)
  54. {
  55. }
  56. }
  57. #endregion
  58. }