@@ -17,16 +17,20 @@ use crate::vm::{analysis, ast, ClarityVersion, ContractContext, SymbolicExpressi
1717/// type-checking, runtime evaluation, and transaction execution.
1818#[ derive( Debug ) ]
1919pub enum ClarityError {
20- /// Error during static type-checking and semantic analysis.
20+ /// Error during static type-checking or semantic analysis.
21+ /// The `StaticCheckError` wraps the specific type-checking error, including diagnostic details.
2122 Analysis ( CheckError ) ,
2223 /// Error during lexical or syntactic parsing.
24+ /// The `ParseError` wraps the specific parsing error, such as invalid syntax or tokens.
2325 Parse ( ParseError ) ,
24- /// Error during runtime evaluation of Clarity code.
26+ /// Error during runtime evaluation in the virtual machine.
27+ /// The `VmExecutionError` wraps the specific error, such as runtime errors or dynamic type-checking errors.
2528 Interpreter ( InterpreterError ) ,
26- /// Transaction is malformed or invalid due to blockchain-level issues (e.g., incorrect
27- /// format, invalid signatures) .
29+ /// Transaction is malformed or invalid due to blockchain-level issues.
30+ /// The `String` wraps a human-readable description of the issue, such as incorrect format or invalid signatures.
2831 BadTransaction ( String ) ,
29- /// Transaction exceeds the allocated cost budget. Contains the actual and maximum allowed costs.
32+ /// Transaction exceeds the allocated cost budget during execution.
33+ /// The first `ExecutionCost` represents the total consumed cost, and the second represents the budget limit.
3034 CostError ( ExecutionCost , ExecutionCost ) ,
3135 /// Transaction aborted by a callback (e.g., post-condition check or custom logic).
3236 AbortedByCallback {
0 commit comments