Browse Source

More consistant error messages

merge-requests/365/head
eidheim 10 years ago
parent
commit
7a229a2e64
  1. 2
      src/cmake.cc
  2. 2
      src/config.cc

2
src/cmake.cc

@ -59,7 +59,7 @@ boost::filesystem::path CMake::get_default_build_path(const boost::filesystem::p
boost::system::error_code ec; boost::system::error_code ec;
boost::filesystem::create_directories(default_build_path, ec); boost::filesystem::create_directories(default_build_path, ec);
if(ec) { if(ec) {
Terminal::get().print("Could not create "+default_build_path.string()+": "+ec.message(), true); Terminal::get().print("Error: could not create "+default_build_path.string()+": "+ec.message(), true);
return boost::filesystem::path(); return boost::filesystem::path();
} }
} }

2
src/config.cc

@ -36,7 +36,7 @@ void Config::load() {
retrieve_config(); retrieve_config();
} }
catch(const std::exception &e) { catch(const std::exception &e) {
::Terminal::get().print("Error reading "+config_json+": "+e.what()+"\n"); ::Terminal::get().print("Error: could not parse "+config_json+": "+e.what()+"\n", true);
std::stringstream ss; std::stringstream ss;
ss << configjson; ss << configjson;
boost::property_tree::read_json(ss, cfg); boost::property_tree::read_json(ss, cfg);

Loading…
Cancel
Save