diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/rust-analyzer/src/dispatch.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/dispatch.rs b/crates/rust-analyzer/src/dispatch.rs index 36f0c1d52..9c8815e29 100644 --- a/crates/rust-analyzer/src/dispatch.rs +++ b/crates/rust-analyzer/src/dispatch.rs | |||
@@ -23,7 +23,7 @@ impl<'a> RequestDispatcher<'a> { | |||
23 | ) -> Result<&mut Self> | 23 | ) -> Result<&mut Self> |
24 | where | 24 | where |
25 | R: lsp_types::request::Request + 'static, | 25 | R: lsp_types::request::Request + 'static, |
26 | R::Params: DeserializeOwned + panic::UnwindSafe + 'static, | 26 | R::Params: DeserializeOwned + panic::UnwindSafe + fmt::Debug + 'static, |
27 | R::Result: Serialize + 'static, | 27 | R::Result: Serialize + 'static, |
28 | { | 28 | { |
29 | let (id, params) = match self.parse::<R>() { | 29 | let (id, params) = match self.parse::<R>() { |
@@ -34,6 +34,7 @@ impl<'a> RequestDispatcher<'a> { | |||
34 | }; | 34 | }; |
35 | let world = panic::AssertUnwindSafe(&mut *self.global_state); | 35 | let world = panic::AssertUnwindSafe(&mut *self.global_state); |
36 | let response = panic::catch_unwind(move || { | 36 | let response = panic::catch_unwind(move || { |
37 | stdx::panic_context::enter(format!("request: {} {:#?}", R::METHOD, params)); | ||
37 | let result = f(world.0, params); | 38 | let result = f(world.0, params); |
38 | result_to_response::<R>(id, result) | 39 | result_to_response::<R>(id, result) |
39 | }) | 40 | }) |
@@ -159,6 +160,7 @@ impl<'a> NotificationDispatcher<'a> { | |||
159 | return Ok(self); | 160 | return Ok(self); |
160 | } | 161 | } |
161 | }; | 162 | }; |
163 | stdx::panic_context::enter(format!("notification: {}", N::METHOD)); | ||
162 | f(self.global_state, params)?; | 164 | f(self.global_state, params)?; |
163 | Ok(self) | 165 | Ok(self) |
164 | } | 166 | } |