The catch block around the return statement was never executing, as it would catch only synchronous errors thrown by `_doHandleExtensionTests`. By awaiting the returned promise, we make sure to catch also promise rejections, which gives us a chance to log the error message on the extension host console as well.
This commit is contained in:
Alexandru Dima
2021-06-09 22:31:05 +02:00
parent ef6ec74920
commit f163b54a19

View File

@@ -551,7 +551,7 @@ export abstract class AbstractExtHostExtensionService extends Disposable impleme
public async $extensionTestsExecute(): Promise<number> {
await this._eagerExtensionsActivated.wait();
try {
return this._doHandleExtensionTests();
return await this._doHandleExtensionTests();
} catch (error) {
console.error(error); // ensure any error message makes it onto the console
throw error;