summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-03-13 18:13:44 (GMT)
committerBrad King <brad.king@kitware.com>2008-03-13 18:13:44 (GMT)
commitfb0296656d4d332b95e50982335231d1b49da3f7 (patch)
treef047df862603456e72708ff46e2d0d5cb5c1c638 /Source/cmMakefile.cxx
parent870571b28b55a929bd423348910951fee182c2a5 (diff)
downloadCMake-fb0296656d4d332b95e50982335231d1b49da3f7.zip
CMake-fb0296656d4d332b95e50982335231d1b49da3f7.tar.gz
CMake-fb0296656d4d332b95e50982335231d1b49da3f7.tar.bz2
ENH: Improve error message when invalid policy is given.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 4819c63..d8989bd 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3332,11 +3332,12 @@ bool cmMakefile::SetPolicy(const char *id,
{
cmPolicies::PolicyID pid;
if (!this->GetPolicies()->GetPolicyID(id, /* out */ pid))
- {
- cmSystemTools::Error("Invalid policy string used. Invalid string was "
- , id);
+ {
+ cmOStringStream e;
+ e << "Policy \"" << id << "\" is not known to this version of CMake.";
+ this->IssueMessage(cmake::FATAL_ERROR, e.str());
return false;
- }
+ }
return this->SetPolicy(pid,status);
}