Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 19b8fae

Browse files
authored
Governance: adding error labels (#3845)
1 parent 6386f24 commit 19b8fae

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

governance/program/src/error.rs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -289,127 +289,127 @@ pub enum GovernanceError {
289289

290290
/// Realm council mint change is not supported
291291
#[error("Realm council mint change is not supported")]
292-
RealmCouncilMintChangeIsNotSupported,
292+
RealmCouncilMintChangeIsNotSupported, // 568
293293

294294
/// Invalid max voter weight absolute value
295295
#[error("Invalid max voter weight absolute value")]
296-
InvalidMaxVoterWeightAbsoluteValue,
296+
InvalidMaxVoterWeightAbsoluteValue, // 569
297297

298298
/// Invalid max voter weight supply fraction
299299
#[error("Invalid max voter weight supply fraction")]
300-
InvalidMaxVoterWeightSupplyFraction,
300+
InvalidMaxVoterWeightSupplyFraction, // 570
301301

302302
/// Owner doesn't have enough governing tokens to create Governance
303303
#[error("Owner doesn't have enough governing tokens to create Governance")]
304-
NotEnoughTokensToCreateGovernance,
304+
NotEnoughTokensToCreateGovernance, // 571
305305

306306
/// Too many outstanding proposals
307307
#[error("Too many outstanding proposals")]
308-
TooManyOutstandingProposals,
308+
TooManyOutstandingProposals, // 572
309309

310310
/// All proposals must be finalized to withdraw governing tokens
311311
#[error("All proposals must be finalized to withdraw governing tokens")]
312-
AllProposalsMustBeFinalisedToWithdrawGoverningTokens,
312+
AllProposalsMustBeFinalisedToWithdrawGoverningTokens, // 573
313313

314314
/// Invalid VoterWeightRecord for Realm
315315
#[error("Invalid VoterWeightRecord for Realm")]
316-
InvalidVoterWeightRecordForRealm,
316+
InvalidVoterWeightRecordForRealm, // 574
317317

318318
/// Invalid VoterWeightRecord for GoverningTokenMint
319319
#[error("Invalid VoterWeightRecord for GoverningTokenMint")]
320-
InvalidVoterWeightRecordForGoverningTokenMint,
320+
InvalidVoterWeightRecordForGoverningTokenMint, // 575
321321

322322
/// Invalid VoterWeightRecord for TokenOwner
323323
#[error("Invalid VoterWeightRecord for TokenOwner")]
324-
InvalidVoterWeightRecordForTokenOwner,
324+
InvalidVoterWeightRecordForTokenOwner, // 576
325325

326326
/// VoterWeightRecord expired
327327
#[error("VoterWeightRecord expired")]
328-
VoterWeightRecordExpired,
328+
VoterWeightRecordExpired, // 577
329329

330330
/// Invalid RealmConfig for Realm
331331
#[error("Invalid RealmConfig for Realm")]
332-
InvalidRealmConfigForRealm,
332+
InvalidRealmConfigForRealm, // 578
333333

334334
/// TokenOwnerRecord already exists
335335
#[error("TokenOwnerRecord already exists")]
336-
TokenOwnerRecordAlreadyExists,
336+
TokenOwnerRecordAlreadyExists, // 579
337337

338338
/// Governing token deposits not allowed
339339
#[error("Governing token deposits not allowed")]
340-
GoverningTokenDepositsNotAllowed,
340+
GoverningTokenDepositsNotAllowed, // 580
341341

342342
/// Invalid vote choice weight percentage
343343
#[error("Invalid vote choice weight percentage")]
344-
InvalidVoteChoiceWeightPercentage,
344+
InvalidVoteChoiceWeightPercentage, // 581
345345

346346
/// Vote type not supported
347347
#[error("Vote type not supported")]
348-
VoteTypeNotSupported,
348+
VoteTypeNotSupported, // 582
349349

350350
/// InvalidProposalOptions
351351
#[error("Invalid proposal options")]
352-
InvalidProposalOptions,
352+
InvalidProposalOptions, // 583
353353

354354
/// Proposal is not not executable
355355
#[error("Proposal is not not executable")]
356-
ProposalIsNotExecutable,
356+
ProposalIsNotExecutable, // 584
357357

358358
/// Invalid vote
359359
#[error("Invalid vote")]
360-
InvalidVote,
360+
InvalidVote, // 585
361361

362362
/// Cannot execute defeated option
363363
#[error("Cannot execute defeated option")]
364-
CannotExecuteDefeatedOption,
364+
CannotExecuteDefeatedOption, // 586
365365

366366
/// VoterWeightRecord invalid action
367367
#[error("VoterWeightRecord invalid action")]
368-
VoterWeightRecordInvalidAction,
368+
VoterWeightRecordInvalidAction, // 587
369369

370370
/// VoterWeightRecord invalid action target
371371
#[error("VoterWeightRecord invalid action target")]
372-
VoterWeightRecordInvalidActionTarget,
372+
VoterWeightRecordInvalidActionTarget, // 588
373373

374374
/// Invalid MaxVoterWeightRecord for Realm
375375
#[error("Invalid MaxVoterWeightRecord for Realm")]
376-
InvalidMaxVoterWeightRecordForRealm,
376+
InvalidMaxVoterWeightRecordForRealm, // 589
377377

378378
/// Invalid MaxVoterWeightRecord for GoverningTokenMint
379379
#[error("Invalid MaxVoterWeightRecord for GoverningTokenMint")]
380-
InvalidMaxVoterWeightRecordForGoverningTokenMint,
380+
InvalidMaxVoterWeightRecordForGoverningTokenMint, // 590
381381

382382
/// MaxVoterWeightRecord expired
383383
#[error("MaxVoterWeightRecord expired")]
384-
MaxVoterWeightRecordExpired,
384+
MaxVoterWeightRecordExpired, // 591
385385

386386
/// Not supported VoteType
387387
#[error("Not supported VoteType")]
388-
NotSupportedVoteType,
388+
NotSupportedVoteType, // 592
389389

390390
/// RealmConfig change not allowed
391391
#[error("RealmConfig change not allowed")]
392-
RealmConfigChangeNotAllowed,
392+
RealmConfigChangeNotAllowed, // 593
393393

394394
/// GovernanceConfig change not allowed
395395
#[error("GovernanceConfig change not allowed")]
396-
GovernanceConfigChangeNotAllowed,
396+
GovernanceConfigChangeNotAllowed, // 594
397397

398398
/// At least one VoteThreshold is required
399399
#[error("At least one VoteThreshold is required")]
400-
AtLeastOneVoteThresholdRequired,
400+
AtLeastOneVoteThresholdRequired, // 595
401401

402402
/// Reserved buffer must be empty
403403
#[error("Reserved buffer must be empty")]
404-
ReservedBufferMustBeEmpty,
404+
ReservedBufferMustBeEmpty, // 596
405405

406406
/// Cannot Relinquish in Finalizing state
407407
#[error("Cannot Relinquish in Finalizing state")]
408-
CannotRelinquishInFinalizingState,
408+
CannotRelinquishInFinalizingState, // 597
409409

410410
/// Invalid RealmConfig account address
411411
#[error("Invalid RealmConfig account address")]
412-
InvalidRealmConfigAddress,
412+
InvalidRealmConfigAddress, // 598
413413

414414
/// Cannot deposit dormant tokens
415415
#[error("Cannot deposit dormant tokens")]

0 commit comments

Comments
 (0)