diff --git a/src/rust/engine/src/context.rs b/src/rust/engine/src/context.rs index 209749611a7..7878a85a76f 100644 --- a/src/rust/engine/src/context.rs +++ b/src/rust/engine/src/context.rs @@ -871,8 +871,14 @@ impl SessionCore { } else { // There are no live or invalidated sources of this Digest. Directly fail. return result.map_err(|e| { + let suffix = if let Some(workunit_data) = workunit.workunit() { + &format!(", with workunit: {:?}", workunit_data) + } else { + "" + }; + throw(format!( - "Could not identify a process to backtrack to for: {e}" + "Could not identify a process to backtrack to for: {e}{suffix}" )) }); } diff --git a/src/rust/engine/workunit_store/src/lib.rs b/src/rust/engine/workunit_store/src/lib.rs index f0fabe8b56d..5035a5eccab 100644 --- a/src/rust/engine/workunit_store/src/lib.rs +++ b/src/rust/engine/workunit_store/src/lib.rs @@ -889,6 +889,10 @@ impl RunningWorkunit { } } + pub fn workunit(&self) -> Option<&Workunit> { + self.workunit.as_ref() + } + pub fn record_observation(&self, metric: ObservationMetric, value: u64) { self.store.record_observation(metric, value); }