Fix callback to display error message instead of {1} (#5577)

This commit is contained in:
Charles Gagnon
2019-05-22 11:45:31 -07:00
committed by GitHub
parent 2ca39b571a
commit 65e59dc57d

View File

@@ -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(<azdata.QueryExecuteMessageParams>{
ownerUri: this.uri,