errors.rs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. use crate::*;
  2. use frame_support::decl_error;
  3. decl_error! {
  4. /// Content directory errors
  5. pub enum Error for Module<T: Trait> {
  6. // Curator Management Errors
  7. // -------------------------
  8. /// Curator group can`t be removed
  9. CuratorGroupRemovalForbidden,
  10. /// Curator under provided curator id is not a member of curaror group under given id
  11. CuratorIsNotAMemberOfGivenCuratorGroup,
  12. /// Curator under provided curator id is already a member of curaror group under given id
  13. CuratorIsAlreadyAMemberOfGivenCuratorGroup,
  14. /// Given curator group does not exist
  15. CuratorGroupDoesNotExist,
  16. /// Max number of curators per group limit reached
  17. CuratorsPerGroupLimitReached,
  18. /// Curator group is not active
  19. CuratorGroupIsNotActive,
  20. // Authentication Errors
  21. // ---------------------
  22. /// Origin cannot be made into raw origin
  23. OriginCanNotBeMadeIntoRawOrigin,
  24. /// Lead authentication failed
  25. LeadAuthFailed,
  26. /// Member authentication failed
  27. MemberAuthFailed,
  28. /// Curator authentication failed
  29. CuratorAuthFailed,
  30. /// Expected root or signed origin
  31. BadOrigin,
  32. }
  33. }