Skip to content

Commit

Permalink
Better error messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar committed Dec 31, 2015
1 parent 353e8e3 commit 28bf983
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/isobuild/compiler-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 28bf983

Please sign in to comment.