PostExceptions.cs 918 B

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