提交 20fc7885 编写于 作者: D Dirk Baeumer

Add better error message

上级 c7930382
......@@ -141,7 +141,7 @@ var XLF = /** @class */ (function () {
};
XLF.prototype.addStringItem = function (item) {
if (!item.id || !item.message) {
throw new Error('No item ID or value specified.');
throw new Error("No item ID or value specified: " + JSON.stringify(item));
}
this.appendNewLine("<trans-unit id=\"" + item.id + "\">", 4);
this.appendNewLine("<source xml:lang=\"en\">" + item.message + "</source>", 6);
......
......@@ -192,7 +192,7 @@ export class XLF {
private addStringItem(item: Item): void {
if (!item.id || !item.message) {
throw new Error('No item ID or value specified.');
throw new Error(`No item ID or value specified: ${JSON.stringify(item)}`);
}
this.appendNewLine(`<trans-unit id="${item.id}">`, 4);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册