Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PanicHookInfo for nightly rust #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/logging.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::wasm_bindgen;
use core::panic::PanicInfo;
use std::panic::PanicHookInfo;
use js_sys::JsString;
use log::error;
pub use log::LevelFilter::*;
Expand Down Expand Up @@ -36,7 +36,7 @@ pub fn setup_logging(verbosity: log::LevelFilter) {
panic::set_hook(Box::new(panic_hook));
}

fn panic_hook(info: &PanicInfo) {
fn panic_hook(info: &PanicHookInfo) {
// import JS Error API to get backtrace info (backtraces don't work in wasm)
// Node 8 does support this API: https://nodejs.org/docs/latest-v8.x/api/errors.html#errors_error_stack

Expand Down