From 28bf983ad5babc670c19b684442e51f649153c3f Mon Sep 17 00:00:00 2001 From: Mitar Date: Thu, 31 Dec 2015 11:17:46 +0100 Subject: [PATCH] Better error messages. --- tools/isobuild/compiler-plugin.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 40d88833d8..b4125e2c49 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -430,13 +430,15 @@ class ResourceSlot { if (! archinfo.matches(unibuild.arch, "web")) { throw new Error("Document sections can only be emitted to " + - "web targets"); + "web targets: " + self.inputResource.path); } if (options.section !== "head" && options.section !== "body") { - throw new Error("'section' must be 'head' or 'body'"); + throw new Error("'section' must be 'head' or 'body': " + + self.inputResource.path); } if (typeof options.data !== "string") { - throw new Error("'data' option to appendDocument must be a string"); + throw new Error("'data' option to appendDocument must be a string: " + + self.inputResource.path); } self.outputResources.push({