aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/src/dispatch.rs21
1 files changed, 17 insertions, 4 deletions
diff --git a/crates/rust-analyzer/src/dispatch.rs b/crates/rust-analyzer/src/dispatch.rs
index 81b85a269..baf2199d9 100644
--- a/crates/rust-analyzer/src/dispatch.rs
+++ b/crates/rust-analyzer/src/dispatch.rs
@@ -33,7 +33,12 @@ impl<'a> RequestDispatcher<'a> {
33 let world = panic::AssertUnwindSafe(&mut *self.global_state); 33 let world = panic::AssertUnwindSafe(&mut *self.global_state);
34 34
35 let response = panic::catch_unwind(move || { 35 let response = panic::catch_unwind(move || {
36 let _pctx = stdx::panic_context::enter(format!("request: {} {:#?}", R::METHOD, params)); 36 let _pctx = stdx::panic_context::enter(format!(
37 "\nversion: {}\nrequest: {} {:#?}",
38 env!("REV"),
39 R::METHOD,
40 params
41 ));
37 let result = f(world.0, params); 42 let result = f(world.0, params);
38 result_to_response::<R>(id, result) 43 result_to_response::<R>(id, result)
39 }) 44 })
@@ -61,8 +66,12 @@ impl<'a> RequestDispatcher<'a> {
61 let world = self.global_state.snapshot(); 66 let world = self.global_state.snapshot();
62 67
63 move || { 68 move || {
64 let _pctx = 69 let _pctx = stdx::panic_context::enter(format!(
65 stdx::panic_context::enter(format!("request: {} {:#?}", R::METHOD, params)); 70 "\nversion: {}\nrequest: {} {:#?}",
71 env!("REV"),
72 R::METHOD,
73 params
74 ));
66 let result = f(world, params); 75 let result = f(world, params);
67 Task::Response(result_to_response::<R>(id, result)) 76 Task::Response(result_to_response::<R>(id, result))
68 } 77 }
@@ -166,7 +175,11 @@ impl<'a> NotificationDispatcher<'a> {
166 return Ok(self); 175 return Ok(self);
167 } 176 }
168 }; 177 };
169 let _pctx = stdx::panic_context::enter(format!("notification: {}", N::METHOD)); 178 let _pctx = stdx::panic_context::enter(format!(
179 "\nversion: {}\nnotification: {}",
180 env!("REV"),
181 N::METHOD
182 ));
170 f(self.global_state, params)?; 183 f(self.global_state, params)?;
171 Ok(self) 184 Ok(self)
172 } 185 }