mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 09:35:41 -05:00
Some promise fixes (#8216)
* Some promise fixes * changes to how we're logging errors * Fix the tests * Fix a few other issues
This commit is contained in:
@@ -11,6 +11,7 @@ import { Trace } from 'vs/platform/instantiation/common/instantiationService';
|
||||
import { values } from 'vs/base/common/map';
|
||||
import { IModuleFactory, IBootstrapParams } from 'sql/workbench/services/bootstrap/common/bootstrapParams';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
|
||||
const selectorCounter = new Map<string, number>();
|
||||
|
||||
@@ -64,6 +65,15 @@ export function bootstrapAngular<T>(service: IInstantiationService, moduleType:
|
||||
if (callbackSetModule) {
|
||||
callbackSetModule(moduleRef);
|
||||
}
|
||||
}).catch((e) => {
|
||||
service.invokeFunction((accessor) => {
|
||||
const logService = accessor.get(ILogService);
|
||||
if (!logService) {
|
||||
console.error(e);
|
||||
return;
|
||||
}
|
||||
logService.error(e);
|
||||
});
|
||||
});
|
||||
|
||||
return uniqueSelectorString;
|
||||
|
||||
@@ -281,7 +281,7 @@ export class ObjectExplorerService implements IObjectExplorerService {
|
||||
this._serverTreeView.deleteObjectExplorerNodeAndRefreshTree(connection).then(() => {
|
||||
this.sendUpdateNodeEvent(connection, session.errorMessage);
|
||||
connection.isDisconnecting = true;
|
||||
this._connectionManagementService.disconnect(connection).then((value) => {
|
||||
this._connectionManagementService.disconnect(connection).then(() => {
|
||||
connection.isDisconnecting = false;
|
||||
}).catch((e) => this.logService.error(e));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user