Skip to content

Commit 623e597

Browse files
committed
Comments'
1 parent 320ea5c commit 623e597

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

protocols/src/diagnostic.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,12 @@ impl DiagnosticHandler {
453453
}
454454
}
455455

456+
/// Emits an error message when an `assert_eq` fails. Arguments are:
457+
/// - The enclosing `Transaction`
458+
/// - The `ExprId`s of the two arguments to the `assert_eq`
459+
/// - The values that the two `Expr`s evaluate to
460+
/// - The arguments `todo_args` supplied to the transaction
461+
/// (for more info in the error msg)
456462
pub fn emit_diagnostic_assertion(
457463
&mut self,
458464
tr: &Transaction,

protocols/src/errors.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,14 @@ pub type ExecutionResult<T> = Result<T, ExecutionError>;
638638
pub struct DiagnosticEmitter;
639639

640640
impl DiagnosticEmitter {
641+
/// Emits an error message that corresponds to a failure when
642+
/// executing a protocol. Arguments are:
643+
/// - The `DiagnosticHandler`
644+
/// - The actual error
645+
/// - The transaction which contained the error
646+
/// - The relevant `SymbolTable` (for resolving variable names)
647+
/// - The arguments (`todo_args`) supplied to the transaction
648+
/// (for extra info in the error message)
641649
pub fn emit_execution_error(
642650
handler: &mut DiagnosticHandler,
643651
error: &ExecutionError,

0 commit comments

Comments
 (0)