Just a comment for later: I think our code will be easier to follow if we make invoke-message-handler handle two special kinds of errors, "error" and "aborted"?, which send the error's error message with show-error and show-info respectively. Then we can get rid of all the if/else nesting and use early return style:
if (problem-one)
signal-lsp-error("i had problem one";
end;
...
if (problem-two)
signal-lsp-info("i had problem two");
end;
... all good; handle the message...
Just a comment for later: I think our code will be easier to follow if we make
invoke-message-handler
handle two special kinds of errors, "error" and "aborted"?, which send the error's error message withshow-error
andshow-info
respectively. Then we can get rid of all theif/else
nesting and use early return style:_Originally posted by @cgay in https://github.com/dylan-lang/lsp-dylan/pull/14#discussion_r967898671_