Skip to content

Commit

Permalink
Added descriptions for errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ndkazu committed Dec 24, 2024
1 parent be3759f commit a34f0d1
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion pop-api/examples/dao/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,16 +345,34 @@ mod dao {
#[derive(Debug, PartialEq, Eq)]
#[ink::scale_derive(Encode, Decode, TypeInfo)]
pub enum Error {
/// This proposal does not exists
ProposalNotFound,

/// The end of the voting period has been reached
VotingPeriodEnded,

/// User is not a member of this Dao
MemberNotFound,

/// User already voted for this proposal
AlreadyVoted,

/// The voting period for this proposal is still ongoing
VotingPeriodNotEnded,

/// This proposal has already been executed
ProposalExecuted,

/// This proposal has been rejected
ProposalRejected,

/// The proposal description is too long
ExceedeMaxDescriptionLength,

/// There are not enough funds in the Dao treasury
NotEnoughFundsAvailable,
None,

/// PSP22 specific error
Psp22(Psp22Error),
}

Expand Down

0 comments on commit a34f0d1

Please sign in to comment.