From 516cdec4894096305f5002b922ba02d49cb3e816 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 2 Oct 2009 09:28:00 +0000 Subject: Optimised auto dependency generation Added control c handler in windows Now throw string exceptions instead of integer exceptions. --- tools/mhmake/src/util.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'tools/mhmake/src/util.cpp') 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 &Args,const string&Makefile) break; #endif default: - cerr << "\nUnknown option: "<<*ArgIt<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 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()); } -- cgit v1.2.3