aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/main_loop
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop')
-rw-r--r--crates/ra_lsp_server/src/main_loop/mod.rs20
1 files changed, 15 insertions, 5 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/mod.rs b/crates/ra_lsp_server/src/main_loop/mod.rs
index 1eb147539..229d1b0f7 100644
--- a/crates/ra_lsp_server/src/main_loop/mod.rs
+++ b/crates/ra_lsp_server/src/main_loop/mod.rs
@@ -376,11 +376,21 @@ impl<'a> PoolDispatcher<'a> {
376 Ok(lsp_error) => { 376 Ok(lsp_error) => {
377 RawResponse::err(id, lsp_error.code, lsp_error.message) 377 RawResponse::err(id, lsp_error.code, lsp_error.message)
378 } 378 }
379 Err(e) => RawResponse::err( 379 Err(e) => {
380 id, 380 if is_canceled(&e) {
381 ErrorCode::InternalError as i32, 381 RawResponse::err(
382 format!("{}\n{}", e, e.backtrace()), 382 id,
383 ), 383 ErrorCode::RequestCancelled as i32,
384 e.to_string(),
385 )
386 } else {
387 RawResponse::err(
388 id,
389 ErrorCode::InternalError as i32,
390 format!("{}\n{}", e, e.backtrace()),
391 )
392 }
393 }
384 }, 394 },
385 }; 395 };
386 let task = Task::Respond(resp); 396 let task = Task::Respond(resp);