As part of the API cleanup for 1.0.0, there are some methods that don't throw IOExceptions despite declaring they do. Originally we were planning on simply hiding the warnings to leave API as is, but this discussion lead to this new issue: #932 (comment)
These are the cases under consideratin:
- org.eclipse.lsp4j.jsonrpc.json.adapters.EitherTypeAdapter.createLeft(L)
- org.eclipse.lsp4j.jsonrpc.json.adapters.EitherTypeAdapter.createRight(R)
- org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(InputStream, Headers)
- org.eclipse.lsp4j.jsonrpc.json.adapters.EitherTypeAdapter.EitherTypeArgument.read(JsonElement)
- and the subclasses that override those methods
Note that LSP4J tries to avoid exceptions bubbling up, and prefers to log errors at message boundaries (such as done in StreamMessageProducer.handleMessage). Otherwise all the processing on reading/writing stops due to a single message error.
As part of the API cleanup for 1.0.0, there are some methods that don't throw IOExceptions despite declaring they do. Originally we were planning on simply hiding the warnings to leave API as is, but this discussion lead to this new issue: #932 (comment)
These are the cases under consideratin:
Note that LSP4J tries to avoid exceptions bubbling up, and prefers to log errors at message boundaries (such as done in
StreamMessageProducer.handleMessage). Otherwise all the processing on reading/writing stops due to a single message error.