Skip to content

Commit 68b9bd6

Browse files
committed
refactor(runfiles): improve @bazel/runfiles error messages
1 parent 1e000a3 commit 68b9bd6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/runfiles/runfiles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export class Runfiles {
168168
// If the repository mappings were loaded ensure the source repository is valid.
169169
if (!(sourceRepo in this.repoMappings)) {
170170
throw new Error(
171-
`source repository ${sourceRepo} not found in repo mappings: ${JSON.stringify(
171+
`source repository "${sourceRepo}" not found in repo mappings: ${JSON.stringify(
172172
this.repoMappings,
173173
null,
174174
2,
@@ -181,7 +181,7 @@ export class Runfiles {
181181
if (result) {
182182
return result;
183183
}
184-
const e = new Error(`could not resolve module ${modulePath}`);
184+
const e = new Error(`could not resolve module "${modulePath}" from repository "${sourceRepo}"`);
185185
(e as any).code = 'MODULE_NOT_FOUND';
186186
throw e;
187187
}

0 commit comments

Comments
 (0)