Skip to content

Commit 91fae1b

Browse files
committed
fix: Make analyse exceptions propagated to Extended Api responses. #960
1 parent 5ed42c3 commit 91fae1b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/src/main/java/org/eclipse/lsp/cobol/service/CobolTextDocumentService.java

+2
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ private void analyzeDocumentFirstTime(String uri, String text, boolean userReque
350350
});
351351
cfAstMap.get(uri).complete(result.getRootNode());
352352
} catch (Exception e) {
353+
cfAstMap.get(uri).completeExceptionally(e);
353354
LOG.error(createDescriptiveErrorMessage("analysis", uri), e);
354355
} finally {
355356
clearAnalysedFutureObject(uri);
@@ -400,6 +401,7 @@ void analyzeChanges(String uri, String text) {
400401
outlineMap.get(uri).complete(result.getOutlineTree());
401402
cfAstMap.get(uri).complete(result.getRootNode());
402403
} catch (Exception ex) {
404+
cfAstMap.get(uri).completeExceptionally(ex);
403405
LOG.error(createDescriptiveErrorMessage("analysis", uri), ex);
404406
} finally {
405407
clearAnalysedFutureObject(uri);

0 commit comments

Comments
 (0)