Skip to content

Commit 166e0ca

Browse files
authored
Merge pull request #9395 from keymanapp/chore/developer/9394-not-a-project-file
chore(developer): add Error_NotAProjectFile 🗜
2 parents 01348f1 + 9a5d671 commit 166e0ca

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

developer/src/kmc/src/messages/messages.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,9 @@ export class InfrastructureMessages {
6868
static Error_FileTypeNotFound = (o:{ext:string}) => m(this.ERROR_FileTypeNotFound,
6969
`A file of type ${o.ext} was not found in the project.`);
7070
static ERROR_FileTypeNotFound = SevError | 0x000E;
71+
72+
static Error_NotAProjectFile = (o:{filename:string}) => m(this.ERROR_NotAProjectFile,
73+
`File ${o.filename} must have a .kpj extension to be treated as a project.`);
74+
static ERROR_NotAProjectFile = SevError | 0x000F;
7175
}
7276

developer/src/kmc/src/util/projectLoader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function loadProject(infile: string, callbacks: CompilerCallbacks) {
2323
// infile should be the .kpj
2424
if(!infile.endsWith(KeymanFileTypes.Source.Project)) {
2525
// TODO separate error code
26-
callbacks.reportMessage(InfrastructureMessages.Error_InvalidProjectFile({message: 'file should have .kpj extension'}));
26+
callbacks.reportMessage(InfrastructureMessages.Error_NotAProjectFile({filename:infile}));
2727
return null;
2828
}
2929

0 commit comments

Comments
 (0)