Make TreeSitterError inherit Exception#83
Conversation
DerekStride
left a comment
There was a problem hiding this comment.
This would be surprising to me as a user of the gem. Why don't we want them to be handled by default rescue blocks?
|
Thanks for replying, I was hoping you'd see it today :)
Take I would argue that I understand that the standard practice is to inherit WDYT? |
DerekStride
left a comment
There was a problem hiding this comment.
I would argue that SymbolNotFoundError and QueryCreationError are also similar in nature, in the sense that if you get them, then you're doing something deeply wrong
Hmm, the others make more sense now that you've laid it out. I'm still on the fence about these ones but also don't have strong feelings.
| # v1.9.2 (05-12-2024) | ||
|
|
||
| - Make `TreeSitter::TreeSitterError < Exception` instead of `StandardErorr`; | ||
| we don't want them to be handled by default `rescue`. | ||
|
|
There was a problem hiding this comment.
This could arguably be a breaking change. I think we should at least bump to v1.10.0 or even v2.0.0.
There was a problem hiding this comment.
I agree with that. Let's bump to 1.10.0. I prefer bumping major when tree-sitter breaks some APIs, but I'm not religious about that. You prefer 2.0.0?
There was a problem hiding this comment.
1.10.0 is good with me 👍
We don't want our exceptions to go unnoticed or handled by default
rescue.Consumers need to handle them explicitly.