Skip to content

Commit d8f131e

Browse files
committed
Correct the error type.
1 parent 2c1383a commit d8f131e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

linera-execution/src/execution.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,7 @@ where
320320
// For composed operations, use the result from the last operation
321321
let previous_results = txn_tracker.previous_operation_results();
322322
if previous_results.is_empty() {
323-
return Err(ExecutionError::InternalError(
324-
"Composed operation requires a previous operation result, but none found"
325-
));
323+
return Err(ExecutionError::ComposedOperationCannotBeFirst);
326324
}
327325
// Get the last operation result as input
328326
previous_results.last().unwrap().clone()

linera-execution/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ pub enum ExecutionError {
211211
DecompressionError(#[from] DecompressionError),
212212
#[error("The given promise is invalid or was polled once already")]
213213
InvalidPromise,
214-
214+
#[error("Composed operation cannot be first")]
215+
ComposedOperationCannotBeFirst,
215216
#[error("Attempted to perform a reentrant call to application {0}")]
216217
ReentrantCall(ApplicationId),
217218
#[error(

0 commit comments

Comments
 (0)