Handle help look up on a non-existent class without crashing#270
Conversation
|
Hi again, Since #270 was just merged, would you mind rebasing this branch onto Regarding |
Handle help lookup for non-existent classes
|
Ajjj It became a |
548439d to
5cb9542
Compare
|
No worries! Ping me when you are finished with the branch and I'll merge. |
5cb9542 to
e2dcd63
Compare
|
I chose 'WarningMsg' and forced to the last commit: fix(help): styling unification. I think this is good to go. |
|
If you want we could go for |
|
Thanks, looks good to me! |
Requesting help for a subject (class) that has no help file currently throws a Lua error for classes. It not really a problem. But it doesn't look fantastic.
Chachachachaaanges:
print(err)switched toutils.print(err)so the method "No results" message matches the new class message.Both of these are routine "not found" outcomes, not errors, so routing them through utils.print (red ErrorMsg + persisted in :messages) may be heavier than warranted — it adds an entry to the message history on every miss. Would you/we prefer these informational misses go to the SuperCollider post window instead?(keeping nvim's message area / :messages uncluttered)
Ps. please note that this cannot really be tested without #269
If the doc-fix branch changes is not included the lua error explodes and we never see the new nice unified styling 8-)
Neeevertheless the important thing here is to catch the non-existing subject/class look up and prevent the lua crash.