Skip to content

Commit 9dfc5b4

Browse files
committed
Add descriptions to ClarityError and its variants
Signed-off-by: Jacinta Ferrant <[email protected]>
1 parent 750ccc5 commit 9dfc5b4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

clarity/src/vm/clarity.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,22 @@ use crate::vm::events::StacksTransactionEvent;
1313
use crate::vm::types::{BuffData, PrincipalData, QualifiedContractIdentifier};
1414
use crate::vm::{analysis, ast, ClarityVersion, ContractContext, SymbolicExpression, Value};
1515

16+
/// Top-level error type for Clarity contract processing, encompassing errors from parsing,
17+
/// type-checking, runtime evaluation, and transaction execution.
1618
#[derive(Debug)]
1719
pub enum ClarityError {
20+
/// Error during static type-checking and semantic analysis.
1821
Analysis(CheckError),
22+
/// Error during lexical or syntactic parsing.
1923
Parse(ParseError),
24+
/// Error during runtime evaluation of Clarity code.
2025
Interpreter(InterpreterError),
26+
/// Transaction is malformed or invalid due to blockchain-level issues (e.g., incorrect
27+
/// format, invalid signatures).
2128
BadTransaction(String),
29+
/// Transaction exceeds the allocated cost budget. Contains the actual and maximum allowed costs.
2230
CostError(ExecutionCost, ExecutionCost),
31+
/// Transaction aborted by a callback (e.g., post-condition check or custom logic).
2332
AbortedByCallback {
2433
/// What the output value of the transaction would have been.
2534
/// This will be a Some for contract-calls, and None for contract initialization txs.

0 commit comments

Comments
 (0)