@@ -49,6 +49,7 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle
49
49
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding' ;
50
50
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry' ;
51
51
import { WorkbenchAsyncDataTree } from 'vs/platform/list/browser/listService' ;
52
+ import { ILogService } from 'vs/platform/log/common/log' ;
52
53
import { IOpenerService } from 'vs/platform/opener/common/opener' ;
53
54
import { IStorageService , StorageScope , StorageTarget } from 'vs/platform/storage/common/storage' ;
54
55
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry' ;
@@ -129,6 +130,7 @@ export class Repl extends FilterViewPane implements IHistoryNavigationWidget {
129
130
@ITelemetryService telemetryService : ITelemetryService ,
130
131
@IMenuService menuService : IMenuService ,
131
132
@ILanguageFeaturesService private readonly languageFeaturesService : ILanguageFeaturesService ,
133
+ @ILogService private readonly logService : ILogService ,
132
134
) {
133
135
const filterText = storageService . get ( FILTER_VALUE_STORAGE_KEY , StorageScope . WORKSPACE , '' ) ;
134
136
super ( {
@@ -401,7 +403,13 @@ export class Repl extends FilterViewPane implements IHistoryNavigationWidget {
401
403
} ) ;
402
404
403
405
if ( this . tree && treeInput !== session ) {
404
- await this . tree . setInput ( session ) ;
406
+ try {
407
+ await this . tree . setInput ( session ) ;
408
+ } catch ( err ) {
409
+ // Ignore error because this may happen multiple times while refreshing,
410
+ // then changing the root may fail. Log to help with debugging if needed.
411
+ this . logService . error ( err ) ;
412
+ }
405
413
revealLastElement ( this . tree ) ;
406
414
}
407
415
}
0 commit comments