From 20fc7885da8b30d07996a1e19dbddcc27b23058a Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 4 Dec 2017 22:13:55 +0100 Subject: [PATCH] Add better error message --- build/lib/i18n.js | 2 +- build/lib/i18n.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/lib/i18n.js b/build/lib/i18n.js index 09a94bc33f1..1be9709523f 100644 --- a/build/lib/i18n.js +++ b/build/lib/i18n.js @@ -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("", 4); this.appendNewLine("" + item.message + "", 6); diff --git a/build/lib/i18n.ts b/build/lib/i18n.ts index abfe57c8afc..db67ffc3812 100644 --- a/build/lib/i18n.ts +++ b/build/lib/i18n.ts @@ -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(``, 4); -- GitLab