aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/functions.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-10-02 09:28:00 +0000
committermarha <marha@users.sourceforge.net>2009-10-02 09:28:00 +0000
commit516cdec4894096305f5002b922ba02d49cb3e816 (patch)
treee34bc97b00f6acf17b33877efb7f5ffa543d2881 /tools/mhmake/src/functions.cpp
parent945c71554aa1866a5286dd4b8f5b199dd7af9be9 (diff)
downloadvcxsrv-516cdec4894096305f5002b922ba02d49cb3e816.tar.gz
vcxsrv-516cdec4894096305f5002b922ba02d49cb3e816.tar.bz2
vcxsrv-516cdec4894096305f5002b922ba02d49cb3e816.zip
Optimised auto dependency generation
Added control c handler in windows Now throw string exceptions instead of integer exceptions.
Diffstat (limited to 'tools/mhmake/src/functions.cpp')
-rw-r--r--tools/mhmake/src/functions.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/tools/mhmake/src/functions.cpp b/tools/mhmake/src/functions.cpp
index 2d93f59cd..5b59044c7 100644
--- a/tools/mhmake/src/functions.cpp
+++ b/tools/mhmake/src/functions.cpp
@@ -83,8 +83,7 @@ string mhmakefileparser::f_filter(const string & Arg) const
int ipos=Arg.find(',');
#ifdef _DEBUG
if (ipos==string::npos) {
- cerr << "filter func should have 2 arguments: "<<Arg<<endl;
- throw 1;
+ throw string("filter func should have 2 arguments: ")+Arg;
}
#endif
string Str=TrimString(Arg.substr(0,ipos));
@@ -123,8 +122,7 @@ string mhmakefileparser::f_filterout(const string & Arg) const
int ipos=Arg.find(',');
#ifdef _DEBUG
if (ipos==string::npos) {
- cerr << "filter func should have 2 arguments: "<<Arg<<endl;
- throw 1;
+ throw string("filter func should have 2 arguments: ")+Arg;
}
#endif
string Str=TrimString(Arg.substr(0,ipos));
@@ -170,8 +168,7 @@ string mhmakefileparser::f_call(const string & Arg) const
#ifdef _DEBUG
if (pFunc==m_Variables.end())
{
- fprintf(stderr,"call to non existing function %s\n",Func.c_str());
- throw(1);
+ throw string("call to non existing function ")+Func;
}
#endif
Func=pFunc->second;
@@ -205,8 +202,7 @@ string mhmakefileparser::f_subst(const string & Arg) const
pTmp=NextCharItem(pTmp,FromString,',');
#ifdef _DEBUG
if (!*pTmp) {
- cerr << "Wrong number of arguments in function subst" << endl;
- throw(1);
+ throw string("Wrong number of arguments in function subst");
}
#endif
@@ -242,8 +238,7 @@ string mhmakefileparser::f_patsubst(const string & Arg) const
pTmp=NextCharItem(pTmp,FromString,',');
#ifdef _DEBUG
if (!*pTmp) {
- cerr << "Wrong number of arguments in function subst" << endl;
- throw(1);
+ throw string("Wrong number of arguments in function subst");
}
#endif
@@ -408,8 +403,7 @@ string mhmakefileparser::f_filesindirs(const string & Arg) const
pTmp=NextCharItem(pTmp,strFiles,',');
#ifdef _DEBUG
if (!*pTmp) {
- cerr << "Wrong number of arguments in function filesindirs" << endl;
- throw(1);
+ throw string("Wrong number of arguments in function filesindirs");
}
#endif
string strDirs;
@@ -541,8 +535,7 @@ string mhmakefileparser::f_addprefix(const string & Arg) const
pTmp=NextCharItem(pTmp,PreFix,',');
#ifdef _DEBUG
if (!*pTmp) {
- cerr << "Wrong number of arguments in function addprefix" << endl;
- throw(1);
+ throw ("Wrong number of arguments in function addprefix");
}
#endif
string FileNames;
@@ -564,8 +557,7 @@ string mhmakefileparser::f_addsuffix(const string & Arg) const
pTmp=NextCharItem(pTmp,SufFix,',');
#ifdef _DEBUG
if (!*pTmp) {
- cerr << "Wrong number of arguments in function addsuffix" << endl;
- throw(1);
+ throw string("Wrong number of arguments in function addsuffix");
}
#endif
string FileNames;
@@ -588,8 +580,7 @@ string mhmakefileparser::f_word(const string & Arg) const
if (!WordNbr)
{
if (!WordNbr) {
- cerr << "Expecting a number bigger then 0 for the word function"<<endl;
- throw(1);
+ throw string ("Expecting a number bigger then 0 for the word function");
}
}
#endif