Skip to content

Commit f6e5449

Browse files
committed
Fixes microsoft#60452: Clarify root cause of exception
1 parent 1da6593 commit f6e5449

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/vs/platform/contextkey/browser/contextKeyService.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,11 @@ export class ContextKeyService extends AbstractContextKeyService implements ICon
294294
}
295295

296296
public getContextValuesContainer(contextId: number): Context {
297-
return this._contexts[String(contextId)];
297+
let result = this._contexts[String(contextId)];
298+
if (!result) {
299+
throw new Error(`Child ContextService has been disposed`);
300+
}
301+
return result;
298302
}
299303

300304
public createChildContext(parentContextId: number = this._myContextId): number {

0 commit comments

Comments
 (0)