better error reporting
This commit is contained in:
parent
bd7ffbc258
commit
f835a83b8d
|
@ -206,6 +206,11 @@ bool cmLoadCommandCommand::InitialPass(std::vector<std::string> const& argsIn)
|
||||||
// create a function blocker and set it up
|
// create a function blocker and set it up
|
||||||
cmLoadedCommand *f = new cmLoadedCommand();
|
cmLoadedCommand *f = new cmLoadedCommand();
|
||||||
f->m_commandName = (*nameFunction)();
|
f->m_commandName = (*nameFunction)();
|
||||||
|
if (!initFunction)
|
||||||
|
{
|
||||||
|
this->SetError("Attempt to load command failed. No init function found.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
(*initFunction)(&f->info);
|
(*initFunction)(&f->info);
|
||||||
m_Makefile->AddCommand(f);
|
m_Makefile->AddCommand(f);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue