mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 07:44:48 -05:00
fix(lsp): hard to soft error when unable to get completion info (#19091)
This commit is contained in:
parent
78c7ff91e3
commit
18e9f4642c
2 changed files with 7 additions and 5 deletions
|
@ -2194,10 +2194,13 @@ impl Inner {
|
|||
));
|
||||
let snapshot = self.snapshot();
|
||||
let maybe_completion_info: Option<tsc::CompletionInfo> =
|
||||
self.ts_server.request(snapshot, req).await.map_err(|err| {
|
||||
error!("Unable to get completion info from TypeScript: {}", err);
|
||||
LspError::internal_error()
|
||||
})?;
|
||||
match self.ts_server.request(snapshot, req).await {
|
||||
Ok(maybe_info) => maybe_info,
|
||||
Err(err) => {
|
||||
error!("Unable to get completion info from TypeScript: {:#}", err);
|
||||
None
|
||||
}
|
||||
};
|
||||
|
||||
if let Some(completions) = maybe_completion_info {
|
||||
let results = completions.as_completion_response(
|
||||
|
|
|
@ -597,7 +597,6 @@ mod deprecated {
|
|||
|
||||
#[cfg(not(unix))]
|
||||
pub fn kill(pid: i32, signal: &str) -> Result<(), AnyError> {
|
||||
use deno_core::error::type_error;
|
||||
use std::io::Error;
|
||||
use std::io::ErrorKind::NotFound;
|
||||
use winapi::shared::minwindef::DWORD;
|
||||
|
|
Loading…
Reference in a new issue