aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/application.rs24
1 files changed, 19 insertions, 5 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 91caade7..2dfccf04 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -399,8 +399,14 @@ impl Application {
match call {
Call::Notification(helix_lsp::jsonrpc::Notification { method, params, .. }) => {
let notification = match Notification::parse(&method, params) {
- Some(notification) => notification,
- None => return,
+ Ok(notification) => notification,
+ Err(err) => {
+ log::error!(
+ "received malformed notification from Language Server: {}",
+ err
+ );
+ return;
+ }
};
match notification {
@@ -613,9 +619,17 @@ impl Application {
method, params, id, ..
}) => {
let call = match MethodCall::parse(&method, params) {
- Some(call) => call,
- None => {
- error!("Method not found {}", method);
+ Ok(call) => call,
+ Err(helix_lsp::Error::Unhandled) => {
+ error!("Language Server: Method not found {}", method);
+ return;
+ }
+ Err(err) => {
+ log::error!(
+ "received malformed method call from Language Server: {}: {}",
+ method,
+ err
+ );
return;
}
};