Repository: deno
Issue: Panic in `deno_core` error handling
Labels: bug,deno_core

```
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: macos aarch64
Version: 1.45.5
Args: ["/Users/runner/work/deno/deno/target/debug/deno", "run", "-A", "--quiet", "--unstable-unsafe-proto", "--unstable-bare-node-builtins", "--unstable-fs", "--v8-flags=--stack-size=4000", "runner.ts", "/Users/runner/work/deno/deno/tests/node_compat/test/parallel/test-util-inspect.js"]

thread 'main' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deno_core-0.300.0/error.rs:1179:69:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:        0x1082a1330 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h205eab4daa59a56a
   1:        0x1082c7494 - core::fmt::write::ha28d0fbf1a1eeba9
   2:        0x10829af94 - std::io::Write::write_fmt::h54f6960924d6c6c0
   3:        0x1082a1188 - std::sys_common::backtrace::print::hb748761a345859f9
   4:        0x1082a28b4 - std::panicking::default_hook::***closure***::h6cb9ca91838de054
   5:        0x1082a2580 - std::panicking::default_hook::h83345dc5126de57b
   6:        0x100ddfd28 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::ha81a919e5615dbb8
   7:        0x1012c51b4 - deno::setup_panic_hook::***closure***::h9a81064d4c1e3c24
   8:        0x1082a3210 - std::panicking::rust_panic_with_hook::h9305dc63490c537b
   9:        0x1082a2bf8 - std::panicking::begin_panic_handler::***closure***::h0d6c6c01f5801c1a
  10:        0x1082a17b4 - std::sys_common::backtrace::__rust_end_short_backtrace::h2ace9f7ada66a76a
  11:        0x1082a2994 - _rust_begin_unwind
  12:        0x1082c46e0 - core::panicking::panic_fmt::hf3031f82c202a80d
  13:        0x1082c4760 - core::panicking::panic::hfb97fcfe2d432218
  14:        0x1082c4470 - core::option::unwrap_failed::h3c5a11fe84707da6
  15:        0x106963570 - deno_core::error::format_stack_trace::hc4dbfdf54eed380d
  16:        0x106960a94 - deno_core::error::prepare_stack_trace_callback::hf0355bd475e9652a
  17:        0x106917684 - core::ops::function::Fn::call::h0f7d330b4ad34f5e
  18:        0x10698c904 - v8::isolate::<impl v8::support::MapFnFrom<F> for extern "C" fn(v8::handle::Local<v8::data::Context>,v8::handle::Local<v8::data::Value>,v8::handle::Local<v8::data::Array>) .> v8::isolate::PrepareStackTraceCallbackRet>::mapping::***closure***::hefec6c7caae737e6
  19:        0x106a6fb0c - <extern "C" fn(A0,A1,A2) .> R as v8::support::CFnFrom<F>>::mapping::c_fn::h3cdff9b00c6e0d35
```

Occurred in CI twice, during this test:

```
  ./target/debug/deno test --config tests/config/deno.json -A tests/node_compat/test.ts -- parallel/test-util-inspect.js
```

Failed CI runs:
- https://github.com/denoland/deno/actions/runs/10198381500/job/28213176619
- https://github.com/denoland/deno/actions/runs/10198414888/job/28213275514