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({