Skip to content

Commit

Permalink
Add an ERROR logging
Browse files Browse the repository at this point in the history
  • Loading branch information
yutannihilation committed Jul 8, 2024
1 parent c231ee5 commit 919de05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/ark/src/lsp/completions/sources/unique/custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use stdext::unwrap;
use stdext::IntoResult;
use tower_lsp::lsp_types::CompletionItem;

use crate::lsp;
use crate::lsp::completions::completion_item::completion_item;
use crate::lsp::completions::completion_item::completion_item_from_dataset;
use crate::lsp::completions::completion_item::completion_item_from_package;
Expand Down Expand Up @@ -89,6 +90,7 @@ pub fn completions_from_custom_source_impl(
//
// cf. https://github.com/posit-dev/positron/issues/3467
if index >= parameters.len() {
lsp::log_error!("Index {index} is out of bounds of the arguments of `{name}`");
return Ok(None);
}
let parameter = parameters.get(index).into_result()?;
Expand Down

0 comments on commit 919de05

Please sign in to comment.