// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
//! This example shows that op-panics currently result in UB (likely "failed to initiate panic")
//! without a custom panic hook that aborts the process or -C panic=abort.
//!
//! This happens due to the UB of panicking in an extern "C",
//! given how ops are reduced via rusty_v8::MapFnTo
//! See:
//! - https://github.com/rust-lang/rust/issues/74990
//! - https://rust-lang.github.io/rfcs/2945-c-unwind-abi.html
use op;
use Extension;
use JsRuntime;
use RuntimeOptions;
// This is a hack to make the `#[op]` macro work with
// deno_core examples.
// You can remove this:
use *;