Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(client): show stacktrace information when adapter fails #397

Merged
merged 1 commit into from
Apr 28, 2024

Conversation

wookayin
Copy link
Contributor

Problem: Warning messages via vim.notify do not retain stack trace,
which makes errors or bugs happened on the adapters' side difficult
to troubleshoot. E.g.:

    neotest-python: vim/_editor.lua:0: E5560: Vimscript function must not be called in a lua loop callback

Solution: Use xpcall, instead of pcall to access the stacktrace
information, and use it when showing warning (error) messages. E.g.:

Problem: Warning messages via `vim.notify` do not retain stack trace,
which makes errors or bugs happened on the adapters' side difficult
to troubleshoot. E.g.:

```
    neotest-python: vim/_editor.lua:0: E5560: Vimscript function must not be called in a lua loop callback
```

Solution: Use `xpcall`, instead of `pcall` to access the stacktrace
information, and use it when showing warning (error) messages. E.g.:
@rcarriga
Copy link
Collaborator

Thanks for the PR!

@rcarriga rcarriga merged commit 658131e into nvim-neotest:master Apr 28, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants