PSStorageException.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. }
  20. #endregion
  21. #region *** Constructors ***
  22. /// <inheritdoc />
  23. public PSStorageException(ErrorCodes code, Exception innerException) : base(code, innerException)
  24. {
  25. }
  26. /// <inheritdoc />
  27. public PSStorageException(ErrorCodes code) : base(code)
  28. {
  29. }
  30. /// <inheritdoc />
  31. public PSStorageException(ErrorCodes code, params object[] messageArguments) : base(code, messageArguments)
  32. {
  33. }
  34. /// <inheritdoc />
  35. public PSStorageException(ErrorCodes code, Exception innerException, params object[] messageArguments) : base(code, innerException, messageArguments)
  36. {
  37. }
  38. #endregion
  39. }
  40. }