mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
dot not crash query editor (#17787)
This commit is contained in:
@@ -300,7 +300,12 @@ export class QueryResultsView extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
private showQueryEditorError(): void {
|
||||
this.notificationService.error(nls.localize('queryResults.queryEditorCrashError', "The query editor ran into an issue and has stopped working. Please save and reopen it."));
|
||||
}
|
||||
|
||||
public set input(input: QueryResultsInput | undefined) {
|
||||
try {
|
||||
this._input = input;
|
||||
this.runnerDisposables.clear();
|
||||
|
||||
@@ -319,7 +324,7 @@ export class QueryResultsView extends Disposable {
|
||||
|
||||
if (info?.queryRunner?.isDisposed) {
|
||||
this.logService.error(`The query runner for '${input.uri}' has been disposed.`);
|
||||
this.notificationService.error(nls.localize('queryResults.queryEditorCrashError', "The query editor ran into an issue and has stopped working. Please save and reopen it."));
|
||||
this.showQueryEditorError();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -338,6 +343,10 @@ export class QueryResultsView extends Disposable {
|
||||
this.runnerDisposables.add(disposable);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
this.logService.error(err);
|
||||
this.showQueryEditorError();
|
||||
}
|
||||
}
|
||||
|
||||
clearInput() {
|
||||
|
||||
Reference in New Issue
Block a user