mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-08 03:10:34 +00:00
fix: propagate errors in publish_diagnostics
using ?
operator
This commit is contained in:
parent
c5d306e4db
commit
dcbba9b933
1 changed files with 2 additions and 11 deletions
|
@ -73,22 +73,13 @@ impl Store {
|
|||
)
|
||||
.await;
|
||||
|
||||
if let Err(e) = client
|
||||
client
|
||||
.publish_diagnostics(
|
||||
Url::parse(uri).unwrap(),
|
||||
diagnostics,
|
||||
Some(document.version),
|
||||
)
|
||||
.await
|
||||
{
|
||||
client
|
||||
.log_message(
|
||||
MessageType::ERROR,
|
||||
&format!("Failed to publish diagnostics: {}", e)
|
||||
)
|
||||
.await;
|
||||
return Err(anyhow!("Failed to publish diagnostics: {}", e));
|
||||
}
|
||||
.await?;
|
||||
} else {
|
||||
client
|
||||
.log_message(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue