Skip to content

Commit aeda2f6

Browse files
committed
Add comments to the new error variants in CheckErrorKind
Signed-off-by: Jacinta Ferrant <jacinta.ferrant@gmail.com>
1 parent 7f06876 commit aeda2f6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

clarity-types/src/errors/analysis.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,13 +484,25 @@ pub enum CheckErrorKind {
484484
AtBlockClosureMustBeReadOnly,
485485

486486
// contract post-conditions
487+
/// Post-condition expects a list of asset allowances but received invalid input.
488+
/// The first `String` wraps the function name, and the second `i32` wraps the argument number.
487489
ExpectedListOfAllowances(String, i32),
490+
/// Allowance expressions are only allowed in specific contexts (`restrict-assets?` or `as-contract?`).
488491
AllowanceExprNotAllowed,
492+
/// Expected an allowance expression but found invalid input.
493+
/// The `String` wraps the unexpected input.
489494
ExpectedAllowanceExpr(String),
495+
/// `with-all-assets-unsafe` is not allowed in this context.
490496
WithAllAllowanceNotAllowed,
497+
/// `with-all-assets-unsafe` cannot be used alongside other allowances.
491498
WithAllAllowanceNotAlone,
499+
/// `with-nft` allowance requires a list of asset identifiers.
492500
WithNftExpectedListOfIdentifiers,
501+
/// `with-nft` allowance identifiers list exceeds the maximum allowed length.
502+
/// The first `u32` represents the maximum length, and the second represents the actual length.
493503
MaxIdentifierLengthExceeded(u32, u32),
504+
/// Too many allowances specified in post-condition.
505+
/// The first `usize` represents the maximum allowed, and the second represents the actual count.
494506
TooManyAllowances(usize, usize),
495507
}
496508

0 commit comments

Comments
 (0)