File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Extension/src/LanguageServer/Providers Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export class FoldingRangeProvider implements vscode.FoldingRangeProvider {
2424 token . onCancellationRequested ( e => this . client . abortRequest ( id ) ) ;
2525 const ranges : GetFoldingRangesResult = await this . client . languageClient . sendRequest ( GetFoldingRangesRequest , params ) ;
2626 if ( ranges . canceled ) {
27- throw new Error ( 'Request for providing folding ranges is cancelled.' ) ;
27+ throw new vscode . CancellationError ( ) ;
2828 } else {
2929 const result : vscode . FoldingRange [ ] = [ ] ;
3030 ranges . ranges . forEach ( ( r ) => {
Original file line number Diff line number Diff line change @@ -32,10 +32,10 @@ export class SemanticTokensProvider implements vscode.DocumentSemanticTokensProv
3232 } ;
3333 const tokensResult : GetSemanticTokensResult = await this . client . languageClient . sendRequest ( GetSemanticTokensRequest , params ) ;
3434 if ( tokensResult . canceled ) {
35- throw new Error ( 'Request for providing semantic tokens is cancelled.' ) ;
35+ throw new vscode . CancellationError ( ) ;
3636 } else {
3737 if ( tokensResult . fileVersion !== openFileVersions . get ( uriString ) ) {
38- throw new Error ( 'The semantic tokens are not related to the current version of the document.' ) ;
38+ throw new vscode . CancellationError ( ) ;
3939 } else {
4040 const builder : vscode . SemanticTokensBuilder = new vscode . SemanticTokensBuilder ( this . client . semanticTokensLegend ) ;
4141 tokensResult . tokens . forEach ( ( token ) => {
You can’t perform that action at this time.
0 commit comments