Skip to content

Commit

Permalink
chore(compartment-mapper): Improve makeBundle diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Nov 15, 2024
1 parent 569c441 commit 52598c1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/compartment-mapper/src/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,14 @@ const sortedModules = (
const source = compartmentSources[compartmentName][moduleSpecifier];
if (source !== undefined) {
const { record, parser, deferredError, bytes } = source;
assert(parser !== undefined);
assert(bytes !== undefined);
assert(
bytes !== undefined,
`No bytes for ${moduleSpecifier} in ${compartmentName}`,
);
assert(
parser !== undefined,
`No parser for ${moduleSpecifier} in ${compartmentName}`,
);
if (deferredError) {
throw Error(
`Cannot bundle: encountered deferredError ${deferredError}`,
Expand Down

0 comments on commit 52598c1

Please sign in to comment.