mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-25 14:20:30 -04:00
Handle Promise errors caused by cancellation (#2420)
- Port of 34ca4c78b2
- This fixes issues where opening an editor send unhandled errors to the debug console, making it hard to debug issues.
This commit is contained in:
@@ -33,6 +33,7 @@ import { SyntaxRangeProvider, ID_SYNTAX_PROVIDER } from './syntaxRangeProvider';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { InitializingRangeProvider, ID_INIT_PROVIDER } from 'vs/editor/contrib/folding/intializingRangeProvider';
|
||||
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
|
||||
export const ID = 'editor.contrib.folding';
|
||||
|
||||
@@ -166,7 +167,7 @@ export class FoldingController implements IEditorContribution {
|
||||
if (foldingModel) {
|
||||
foldingModel.applyMemento(state.collapsedRegions);
|
||||
}
|
||||
});
|
||||
}).done(undefined, onUnexpectedError);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,7 +313,7 @@ export class FoldingController implements IEditorContribution {
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}).done(undefined, onUnexpectedError);
|
||||
|
||||
}
|
||||
|
||||
@@ -404,7 +405,7 @@ export class FoldingController implements IEditorContribution {
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}).done(undefined, onUnexpectedError);
|
||||
}
|
||||
|
||||
public reveal(position: IPosition): void {
|
||||
|
||||
Reference in New Issue
Block a user