improve error message on a stray "endwhile()"
This commit is contained in:
parent
3d8028841d
commit
f605b92dec
@ -12,12 +12,21 @@
|
|||||||
#include "cmEndWhileCommand.h"
|
#include "cmEndWhileCommand.h"
|
||||||
|
|
||||||
bool cmEndWhileCommand
|
bool cmEndWhileCommand
|
||||||
::InvokeInitialPass(std::vector<cmListFileArgument> const&,
|
::InvokeInitialPass(std::vector<cmListFileArgument> const& args,
|
||||||
cmExecutionStatus &)
|
cmExecutionStatus &)
|
||||||
{
|
{
|
||||||
|
if (args.empty())
|
||||||
|
{
|
||||||
|
this->SetError("An ENDWHILE command was found outside of a proper "
|
||||||
|
"WHILE ENDWHILE structure.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
this->SetError("An ENDWHILE command was found outside of a proper "
|
this->SetError("An ENDWHILE command was found outside of a proper "
|
||||||
"WHILE ENDWHILE structure. Or its arguments did not "
|
"WHILE ENDWHILE structure. Or its arguments did not "
|
||||||
"match the opening WHILE command.");
|
"match the opening WHILE command.");
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ public:
|
|||||||
* Override cmCommand::InvokeInitialPass to get arguments before
|
* Override cmCommand::InvokeInitialPass to get arguments before
|
||||||
* expansion.
|
* expansion.
|
||||||
*/
|
*/
|
||||||
virtual bool InvokeInitialPass(std::vector<cmListFileArgument> const&,
|
virtual bool InvokeInitialPass(std::vector<cmListFileArgument> const& args,
|
||||||
cmExecutionStatus &status);
|
cmExecutionStatus &status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user