File tree Expand file tree Collapse file tree
turbopack/crates/turbo-tasks/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1188,20 +1188,20 @@ impl<B: Backend + 'static> TurboTasks<B> {
11881188
11891189struct TurboTasksExecutor ;
11901190
1191- /// Run a future that drives backend hooks (`task_execution_canceled`,
1192- /// `try_start_task_execution`, `task_execution_completed`) without their own
1193- /// panic boundary. A panic here corrupts backend invariants (per-task locks,
1194- /// restoration flags, aggregation queues, etc.) and historically manifested as
1195- /// a silent hang. Abort the process so the panic is loud and immediate.
1191+ /// Run a future and abort the process if a panic is reported
1192+ ///
1193+ /// Turbtasks catches panics from user code and propagates throught the task tree, but if it happens
1194+ /// as part of state management we have to abort
11961195async fn abort_on_panic < F : Future > ( f : F ) -> F :: Output {
11971196 use futures:: FutureExt ;
11981197 match AssertUnwindSafe ( f) . catch_unwind ( ) . await {
11991198 Ok ( r) => r,
12001199 Err ( _) => {
12011200 eprintln ! (
1202- "[turbo-tasks] task execution loop panicked outside the user-task panic boundary. \
1203- Backend state is now inconsistent; aborting to avoid a silent hang. See the \
1204- panic message above."
1201+ "\n turbo-tasks: an internal panic occurred outside the per-task panic \
1202+ boundary. This is a bug in turbo-tasks/Turbopack — please report it at \
1203+ https://github.com/vercel/next.js/discussions and include the panic message \
1204+ and stack trace above.\n \n Aborting."
12051205 ) ;
12061206 abort ( ) ;
12071207 }
You can’t perform that action at this time.
0 commit comments