aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/util.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/util.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/util.cpp')
-rw-r--r--tools/mhmake/src/util.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/tools/mhmake/src/util.cpp b/tools/mhmake/src/util.cpp
index 608311e94..f89009206 100644
--- a/tools/mhmake/src/util.cpp
+++ b/tools/mhmake/src/util.cpp
@@ -406,9 +406,7 @@ loadedmakefile::loadedmakefile(vector<string> &Args,const string&Makefile)
break;
#endif
default:
- cerr << "\nUnknown option: "<<*ArgIt<<endl<<endl;
- cerr << s_UsageString;
- throw(1);
+ throw string("\nUnknown option: ")+*ArgIt+"\n\n"+ s_UsageString;
}
}
else
@@ -502,8 +500,7 @@ void loadedmakefile::LoadMakefile()
int result=m_pParser->ParseFile(BeforeMakefile,true);
if (result)
{
- printf("Error parsing %s\n",BeforeMakefile->GetQuotedFullFileName().c_str());
- throw(1);
+ throw string("Error parsing ")+BeforeMakefile->GetQuotedFullFileName();
}
m_pParser->UpdateDate(BeforeMakefile->GetDate());
@@ -511,8 +508,7 @@ void loadedmakefile::LoadMakefile()
string ObjDirName=m_pParser->ExpandExpression("$(OBJDIR)");
if (!ObjDirName.size())
{
- printf("When making use of MHMAKECONF, you have to define OBJDIR in makefile.before");
- throw(1);
+ throw string("When making use of MHMAKECONF, you have to define OBJDIR in makefile.before");
}
DepFile=GetFileInfo(ObjDirName+OSPATHSEPSTR MAKEDEPFILE);
m_pParser->SetVariable(AUTODEPFILE,DepFile->GetQuotedFullFileName());
@@ -547,8 +543,7 @@ void loadedmakefile::LoadMakefile()
int result=m_pParser->ParseFile(m_Makefile,true);
if (result)
{
- printf("Error parsing %s\n",m_Makefile->GetQuotedFullFileName().c_str());
- throw(1);
+ throw string("Error parsing ")+m_Makefile->GetQuotedFullFileName();
}
#ifdef _DEBUG
/* Check if the makefile has changed the AUTODEPFILE variable, if so generate a warning that a
@@ -574,8 +569,7 @@ void loadedmakefile::LoadMakefile()
refptr<fileinfo> AfterMakefile=GetFileInfo(BaseAutoMak+".after",sm_Statics.m_MhMakeConf);
int result=m_pParser->ParseFile(AfterMakefile);
if (result) {
- printf("Error parsing %s\n",AfterMakefile->GetQuotedFullFileName().c_str());
- throw(1);
+ throw string("Error parsing ")+AfterMakefile->GetQuotedFullFileName();
}
m_pParser->UpdateDate(AfterMakefile->GetDate());
}