Skip to content

Commit

Permalink
[Turbopack] add stack traces of turbo tasks functions (vercel#72329)
Browse files Browse the repository at this point in the history
### What?

add stack traces to error in the new backend similar to the old backend

Closes PACK-3386
  • Loading branch information
sokra authored Nov 6, 2024
1 parent bed5082 commit b9dcc6c
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,20 @@ impl UpdateOutputOperation {
}
Ok(Err(err)) => {
task.insert(CachedDataItem::Error {
value: SharedError::new(err),
value: SharedError::new(err.context(format!(
"Execution of {} failed",
ctx.get_task_description(task_id)
))),
});
OutputValue::Error
}
Err(panic) => {
task.insert(CachedDataItem::Error {
value: SharedError::new(anyhow!("Panic: {:?}", panic)),
value: SharedError::new(anyhow!(
"Panic in {}: {:?}",
ctx.get_task_description(task_id),
panic
)),
});
OutputValue::Panic
}
Expand Down

0 comments on commit b9dcc6c

Please sign in to comment.