From 44334f6f56bd99635f650796af0db8047e4c21c4 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 8 Sep 2018 09:18:42 +0300 Subject: fix labled expressions --- crates/server/src/main.rs | 3 ++- crates/server/src/main_loop/mod.rs | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'crates/server/src') diff --git a/crates/server/src/main.rs b/crates/server/src/main.rs index baabde629..968b3b87a 100644 --- a/crates/server/src/main.rs +++ b/crates/server/src/main.rs @@ -11,7 +11,8 @@ use gen_lsp_server::{run_server, stdio_transport}; use m::Result; fn main() -> Result<()> { - Logger::with_env_or_str("m=error") + ::std::env::set_var("RUST_BACKTRACE", "short"); + Logger::with_env_or_str("error") .duplicate_to_stderr(Duplicate::All) .log_to_file() .directory("log") diff --git a/crates/server/src/main_loop/mod.rs b/crates/server/src/main_loop/mod.rs index 52f2a8977..2ef1e2d17 100644 --- a/crates/server/src/main_loop/mod.rs +++ b/crates/server/src/main_loop/mod.rs @@ -38,7 +38,9 @@ pub fn main_loop( msg_sender: &mut Sender, ) -> Result<()> { let pool = rayon::ThreadPoolBuilder::new() - .num_threads(4).build() + .num_threads(4) + .panic_handler(|_| error!("thread panicked :(")) + .build() .unwrap(); let (task_sender, task_receiver) = unbounded::(); let (fs_sender, fs_receiver, fs_watcher) = vfs::roots_loader(); -- cgit v1.2.3