From 65e59dc57da13e908fcfb56d4b013259f390dc59 Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Wed, 22 May 2019 11:45:31 -0700 Subject: [PATCH] Fix callback to display error message instead of {1} (#5577) --- src/sql/platform/query/common/queryRunner.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sql/platform/query/common/queryRunner.ts b/src/sql/platform/query/common/queryRunner.ts index a474151823..8cb8e634b1 100644 --- a/src/sql/platform/query/common/queryRunner.ts +++ b/src/sql/platform/query/common/queryRunner.ts @@ -212,6 +212,9 @@ export default class QueryRunner extends Disposable { private handleFailureRunQueryResult(error: any) { // Attempting to launch the query failed, show the error message const eol = this.getEolString(); + if (error instanceof Error) { + error = error.message; + } let message = nls.localize('query.ExecutionFailedError', 'Execution failed due to an unexpected error: {0}\t{1}', eol, error); this.handleMessage({ ownerUri: this.uri,