Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions interp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
cli.max_steps.unwrap_or(u32::MAX),
);
let results = scheduler.execute_todos();
scheduler.emit_all_diagnostics();

// Check whether the protocol was executed successfully
for res in results {
Expand Down
7 changes: 5 additions & 2 deletions protocols/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,11 @@ impl DiagnosticEmitter {
ExecutionError::Assertion(assert_err) => {
Self::emit_assertion_error(handler, assert_err, transaction, symbol_table);
}
ExecutionError::MaxStepsReached(_) => {
handler.emit_general_message(&format!("{error}"), Level::Error);
ExecutionError::MaxStepsReached(max_steps) => {
let thread_err = ThreadError::ExecutionLimitExceeded {
max_steps: *max_steps as usize,
};
Self::emit_thread_error(handler, &thread_err, transaction, symbol_table);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion protocols/src/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ impl<'a> Scheduler<'a> {
self.results.clone()
}

fn emit_all_diagnostics(&mut self) {
pub fn emit_all_diagnostics(&mut self) {
// results and todos are parallel arrays, so we can use the same idx
for (idx, result) in self.results.iter().enumerate() {
if let Err(error) = result {
Expand Down
Loading