Skip to content

Commit d614db8

Browse files
committed
refactor: improve error message when file for reading is not found
1 parent 71167d5 commit d614db8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ export const schematicRunner = new SchematicTestRunner(
4646
export const getSourceFile = (host: Tree, path: string): ts.SourceFile => {
4747
const buffer = host.read(path);
4848
if (!buffer) {
49-
throw new SchematicsException(`Could not find bootstrapped module.`);
49+
throw new SchematicsException(
50+
`Could not find file at ${path}. See https://github.com/NativeScript/nativescript-schematics/issues/172.`
51+
);
5052
}
5153
const content = buffer.toString();
5254
const source = ts.createSourceFile(path, content, ts.ScriptTarget.Latest, true);

0 commit comments

Comments
 (0)