PSStorageException.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using Quadarax.Foundation.Core.Attributes;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using Quadarax.Foundation.Core.Exceptions;
  8. namespace qdr.fnd.core.pqueue.Exceptions
  9. {
  10. public class PSStorageException : CodeException<PSStorageException.ErrorCodes>
  11. {
  12. #region *** Error Codes ***
  13. public enum ErrorCodes : int
  14. {
  15. [ErrorMessage("Item with id={0} not found in storage.")]
  16. PsStorageItemNotFound = 6000,
  17. [ErrorMessage("Item with id={0} already exists in storage.")]
  18. PsStorageItemAlreadyExists = 6001,
  19. [ErrorMessage("Argument name={1} on item id={0} not found in storage.")]
  20. PsStorageItemArgumentNotFound = 6002,
  21. [ErrorMessage("Argument name={1} on item id={0} already exists in storage.")]
  22. PsStorageItemArgumentAlreadyExists = 6003,
  23. }
  24. #endregion
  25. #region *** Constructors ***
  26. /// <inheritdoc />
  27. public PSStorageException(ErrorCodes code, Exception innerException) : base(code, innerException)
  28. {
  29. }
  30. /// <inheritdoc />
  31. public PSStorageException(ErrorCodes code) : base(code)
  32. {
  33. }
  34. /// <inheritdoc />
  35. public PSStorageException(ErrorCodes code, params object[] messageArguments) : base(code, messageArguments)
  36. {
  37. }
  38. /// <inheritdoc />
  39. public PSStorageException(ErrorCodes code, Exception innerException, params object[] messageArguments) : base(code, innerException, messageArguments)
  40. {
  41. }
  42. #endregion
  43. }
  44. }