Improve missing placeholder warning message (#22630)

* Improve missing placeholder warning message

* stringify
This commit is contained in:
Charles Gagnon
2023-04-05 11:42:26 -07:00
committed by GitHub
parent a30719c471
commit df1accf918
2 changed files with 2 additions and 2 deletions

View File

@@ -167,7 +167,7 @@ export default class TextComponent extends TitledComponent<azdata.TextComponentP
for (let i: number = 0; i < links.length; i++) {
const placeholderIndex = text.indexOf(`{${i}}`);
if (placeholderIndex < 0) {
this.logService.warn(`Could not find placeholder text {${i}} in text ${this.value}`);
this.logService.warn(`Could not find placeholder text {${i}} in text '${this.value}'. Link: ${JSON.stringify(links[i])}`);
// Just continue on so we at least show the rest of the text if just one was missed or something
continue;
}

View File

@@ -141,7 +141,7 @@ export class InfoBox extends Disposable implements IThemable {
for (let i = 0; i < this._links.length; i++) {
const placeholderIndex = text.indexOf(`{${i}}`);
if (placeholderIndex < 0) {
this._logService.warn(`Could not find placeholder text {${i}} in text ${text}`);
this._logService.warn(`Could not find placeholder text {${i}} in text '${text}'. Link: ${JSON.stringify(this._links[i])}`);
// Just continue on so we at least show the rest of the text if just one was missed or something
continue;
}