Better error checking.

This commit is contained in:
Berk Geveci 2001-07-02 14:03:20 -04:00
parent 238fe481f3
commit 44062bf4b7
3 changed files with 15 additions and 0 deletions

View File

@ -69,6 +69,11 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string>& args)
j != args.end(); ++j) j != args.end(); ++j)
{ {
cmMakefile::SourceMap::iterator l = Classes.find(*j); cmMakefile::SourceMap::iterator l = Classes.find(*j);
if (l == Classes.end())
{
this->SetError("bad source list passed to VTKWrapJavaCommand");
return false;
}
for(std::vector<cmSourceFile>::iterator i = l->second.begin(); for(std::vector<cmSourceFile>::iterator i = l->second.begin();
i != l->second.end(); i++) i != l->second.end(); i++)
{ {

View File

@ -70,6 +70,11 @@ bool cmVTKWrapPythonCommand::InitialPass(std::vector<std::string>& args)
j != args.end(); ++j) j != args.end(); ++j)
{ {
cmMakefile::SourceMap::iterator l = Classes.find(*j); cmMakefile::SourceMap::iterator l = Classes.find(*j);
if (l == Classes.end())
{
this->SetError("bad source list passed to VTKWrapPythonCommand");
return false;
}
for(std::vector<cmSourceFile>::iterator i = l->second.begin(); for(std::vector<cmSourceFile>::iterator i = l->second.begin();
i != l->second.end(); i++) i != l->second.end(); i++)
{ {

View File

@ -101,6 +101,11 @@ bool cmVTKWrapTclCommand::InitialPass(std::vector<std::string>& args)
j != sources.end(); ++j) j != sources.end(); ++j)
{ {
cmMakefile::SourceMap::iterator l = Classes.find(*j); cmMakefile::SourceMap::iterator l = Classes.find(*j);
if (l == Classes.end())
{
this->SetError("bad source list passed to VTKWrapTclCommand");
return false;
}
for(std::vector<cmSourceFile>::iterator i = l->second.begin(); for(std::vector<cmSourceFile>::iterator i = l->second.begin();
i != l->second.end(); i++) i != l->second.end(); i++)
{ {