mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -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 snapshot = self.snapshot();
|
||||||
let maybe_completion_info: Option<tsc::CompletionInfo> =
|
let maybe_completion_info: Option<tsc::CompletionInfo> =
|
||||||
self.ts_server.request(snapshot, req).await.map_err(|err| {
|
match self.ts_server.request(snapshot, req).await {
|
||||||
error!("Unable to get completion info from TypeScript: {}", err);
|
Ok(maybe_info) => maybe_info,
|
||||||
LspError::internal_error()
|
Err(err) => {
|
||||||
})?;
|
error!("Unable to get completion info from TypeScript: {:#}", err);
|
||||||
|
None
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
if let Some(completions) = maybe_completion_info {
|
if let Some(completions) = maybe_completion_info {
|
||||||
let results = completions.as_completion_response(
|
let results = completions.as_completion_response(
|
||||||
|
|
|
@ -597,7 +597,6 @@ mod deprecated {
|
||||||
|
|
||||||
#[cfg(not(unix))]
|
#[cfg(not(unix))]
|
||||||
pub fn kill(pid: i32, signal: &str) -> Result<(), AnyError> {
|
pub fn kill(pid: i32, signal: &str) -> Result<(), AnyError> {
|
||||||
use deno_core::error::type_error;
|
|
||||||
use std::io::Error;
|
use std::io::Error;
|
||||||
use std::io::ErrorKind::NotFound;
|
use std::io::ErrorKind::NotFound;
|
||||||
use winapi::shared::minwindef::DWORD;
|
use winapi::shared::minwindef::DWORD;
|
||||||
|
|
Loading…
Reference in a new issue