mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 07:44:48 -05:00
Remove custom panic handler.
This was introduced because Tokio would swallow panics. This is still the case, but this panic handler causes more problems than it solves. It requires people to know how to use debuggers to inspect stacktraces. TODO: - Fix Tokio to not swallow errors. - Be vigilant in the intrim to not introduce broken tests due to this unfortunate "feature" of tokio.
This commit is contained in:
parent
81c8926ee9
commit
a8c3b44804
1 changed files with 0 additions and 8 deletions
|
@ -77,14 +77,6 @@ fn print_err_and_exit(err: js_errors::JSError) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// Rust does not die on panic by default. And -Cpanic=abort is broken.
|
|
||||||
// https://github.com/rust-lang/cargo/issues/2738
|
|
||||||
// Therefore this hack.
|
|
||||||
std::panic::set_hook(Box::new(|panic_info| {
|
|
||||||
eprintln!("{}", panic_info.to_string());
|
|
||||||
std::process::abort();
|
|
||||||
}));
|
|
||||||
|
|
||||||
log::set_logger(&LOGGER).unwrap();
|
log::set_logger(&LOGGER).unwrap();
|
||||||
let args = env::args().collect();
|
let args = env::args().collect();
|
||||||
let (flags, rest_argv, usage_string) =
|
let (flags, rest_argv, usage_string) =
|
||||||
|
|
Loading…
Reference in a new issue