mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-10 19:05:31 +00:00
Merge pull request #9395 from keymanapp/chore/developer/9394-not-a-project-file
chore(developer): add Error_NotAProjectFile 🗜
This commit is contained in:
commit
166e0ca992
2 changed files with 5 additions and 1 deletions
|
|
@ -68,5 +68,9 @@ export class InfrastructureMessages {
|
|||
static Error_FileTypeNotFound = (o:{ext:string}) => m(this.ERROR_FileTypeNotFound,
|
||||
`A file of type ${o.ext} was not found in the project.`);
|
||||
static ERROR_FileTypeNotFound = SevError | 0x000E;
|
||||
|
||||
static Error_NotAProjectFile = (o:{filename:string}) => m(this.ERROR_NotAProjectFile,
|
||||
`File ${o.filename} must have a .kpj extension to be treated as a project.`);
|
||||
static ERROR_NotAProjectFile = SevError | 0x000F;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export function loadProject(infile: string, callbacks: CompilerCallbacks) {
|
|||
// infile should be the .kpj
|
||||
if(!infile.endsWith(KeymanFileTypes.Source.Project)) {
|
||||
// TODO separate error code
|
||||
callbacks.reportMessage(InfrastructureMessages.Error_InvalidProjectFile({message: 'file should have .kpj extension'}));
|
||||
callbacks.reportMessage(InfrastructureMessages.Error_NotAProjectFile({filename:infile}));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue