PostExceptions.cs 801 B

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