// SPDX-License-Identifier: LGPL-2.1-only // Copyright (C) 2026 Liberux Labs, S. L. //! Panics into the browser's console, which otherwise only shows the trap they end in. Standard output and error go nowhere in `wasm32-unknown-unknown`. use std::sync::Once; pub( super ) fn install_panic_hook() { static HOOK: Once = Once::new(); HOOK.call_once( || { std::panic::set_hook( Box::new( |info| web_sys::console::error_1( &info.to_string().into() ) ) ); } ); }