PostExceptions.cs 942 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace InABox.Core.Postable
  5. {
  6. public class EmptyPostException : Exception
  7. {
  8. public EmptyPostException() { }
  9. }
  10. public class PostFailedMessageException : Exception
  11. {
  12. public PostFailedMessageException(string message): base(message) { }
  13. }
  14. public class MissingSettingsException : Exception
  15. {
  16. public Type PostableType { get; }
  17. public MissingSettingsException(Type postableType) : base($"No PostableSettings for ${postableType}")
  18. {
  19. PostableType = postableType;
  20. }
  21. }
  22. public class RepostedException : Exception
  23. {
  24. public RepostedException() : base("Cannot process an item twice.")
  25. {
  26. }
  27. }
  28. public class PostCancelledException : Exception
  29. {
  30. public PostCancelledException() : base("Processing cancelled")
  31. {
  32. }
  33. }
  34. }