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

chore!: error handling #285

Merged
merged 1 commit into from
Dec 24, 2022
Merged

chore!: error handling #285

merged 1 commit into from
Dec 24, 2022

Conversation

numToStr
Copy link
Owner

This adds error handling to the plugin, implemented with the help of assert and xpcall. Adding explicit error handling for the following cases:

  • Invalid commenstring / Commenting is not supported like json
  • When filetype doesn't support block comments like yaml
  • Graceful handling of certain cases like uncommenting when there is nothing to uncomment.

fixes #221
supersedes #277

lua/Comment/ft.lua Outdated Show resolved Hide resolved
@numToStr numToStr changed the title fix!: error handling chore!: error handling Dec 24, 2022
@numToStr numToStr marked this pull request as ready for review December 24, 2022 09:11
@numToStr numToStr merged commit 2a16514 into master Dec 24, 2022
@numToStr numToStr deleted the error branch December 24, 2022 09:14
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.

[BUG] api.uncomment.linewise.* give error when nothing to uncomment
1 participant