diff --git a/tools/create_msvc/create_msvc.cpp b/tools/create_msvc/create_msvc.cpp index 8b3f0e09109..c5f0bdab8ca 100644 --- a/tools/create_msvc/create_msvc.cpp +++ b/tools/create_msvc/create_msvc.cpp @@ -227,13 +227,7 @@ int main(int argc, char *argv[]) { setup.libraries.push_back("winmm.lib"); setup.libraries.push_back("sdl.lib"); - try { - createMSVCProject(setup, msvcVersion); - } catch (const std::string &error) { - std::cerr << "ERROR: " << error << "!" << std::endl; - } catch (const std::exception &exp) { - std::cerr << "ERROR: " << exp.what() << "!" << std::endl; - } + createMSVCProject(setup, msvcVersion); } namespace { @@ -363,7 +357,7 @@ EngineDescList parseConfigure(const std::string &srcDir) { break; if (configure.fail()) - throw std::string("Failed while reading from " + configureFile); + error("Failed while reading from " + configureFile); EngineDesc desc; if (parseEngine(line, desc)) @@ -709,11 +703,11 @@ UUIDMap createUUIDMap(const BuildSetup &setup) { std::string createUUID() { UUID uuid; if (UuidCreate(&uuid) != RPC_S_OK) - throw std::string("UuidCreate failed"); + error("UuidCreate failed"); unsigned char *string = 0; if (UuidToStringA(&uuid, &string) != RPC_S_OK) - throw std::string("UuidToStringA failed"); + error("UuidToStringA failed"); std::string result = std::string((char *)string); std::transform(result.begin(), result.end(), result.begin(), toupper); @@ -724,7 +718,7 @@ std::string createUUID() { void createScummVMSolution(const BuildSetup &setup, const UUIDMap &uuids, const int version) { UUIDMap::const_iterator svmUUID = uuids.find("scummvm"); if (svmUUID == uuids.end()) - throw std::string("No UUID for \"scummvm\" project created"); + error("No UUID for \"scummvm\" project created"); const std::string svmProjectUUID = svmUUID->second; assert(!svmProjectUUID.empty()); @@ -733,7 +727,7 @@ void createScummVMSolution(const BuildSetup &setup, const UUIDMap &uuids, const std::ofstream solution((setup.outputDir + '/' + "scummvm.sln").c_str()); if (!solution) - throw std::string("Could not open \"" + setup.outputDir + '/' + "scummvm.sln\" for writing"); + error("Could not open \"" + setup.outputDir + '/' + "scummvm.sln\" for writing"); solution << "Microsoft Visual Studio Solution File, Format Version " << version + 1 << ".00\n"; if (version == 9) @@ -741,7 +735,7 @@ void createScummVMSolution(const BuildSetup &setup, const UUIDMap &uuids, const else if (version == 8) solution << "# Visual Studio 2005\n"; else - throw std::string("Unsupported version passed to createScummVMSolution"); + error("Unsupported version passed to createScummVMSolution"); solution << "Project(\"{" << solutionUUID << "}\") = \"scummvm\", \"scummvm.vcproj\", \"{" << svmProjectUUID << "}\"\n" << "\tProjectSection(ProjectDependencies) = postProject\n"; @@ -796,7 +790,7 @@ void createProjectFile(const std::string &name, const std::string &uuid, const B const std::string projectFile = setup.outputDir + '/' + name + ".vcproj"; std::ofstream project(projectFile.c_str()); if (!project) - throw std::string("Could not open \"" + projectFile + "\" for writing"); + error("Could not open \"" + projectFile + "\" for writing"); project << "\n" "\n" "\n" "\n" "\n" "