From: Ben Hutchings Date: Sat, 7 Jul 2007 12:20:36 +0000 (+0000) Subject: Changed informational, warning and error messages to use standard prefixes. X-Git-Tag: 1.2~5 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=fdb477d14a28e89299a66328bd0f4f723098c508;p=videolink.git Changed informational, warning and error messages to use standard prefixes. --- diff --git a/generate_dvd.cpp b/generate_dvd.cpp index d695c8e..45e9ca6 100644 --- a/generate_dvd.cpp +++ b/generate_dvd.cpp @@ -161,12 +161,12 @@ void dvd_generator::generate_menu_vob(unsigned index, std::string background_name( temp_file_name(temp_dir_, "menu-%3d-back.png", 1 + index)); - std::cout << "saving " << background_name << std::endl; + std::cout << "INFO: Saving " << background_name << std::endl; background->save(background_name, "png"); std::string highlights_name( temp_file_name(temp_dir_, "menu-%3d-links.png", 1 + index)); - std::cout << "saving " << highlights_name << std::endl; + std::cout << "INFO: Saving " << highlights_name << std::endl; highlights->save(highlights_name, "png"); std::string spumux_name( @@ -281,7 +281,7 @@ void dvd_generator::generate_menu_vob(unsigned index, const char * argv[] = { "/bin/sh", "-c", command.c_str(), 0 }; - std::cout << "running " << command << std::endl; + std::cout << "INFO: Running " << command << std::endl; int command_result; Glib::spawn_sync(".", Glib::ArrayHandle( diff --git a/temp_file.cpp b/temp_file.cpp index 323b358..e1c139e 100644 --- a/temp_file.cpp +++ b/temp_file.cpp @@ -109,6 +109,6 @@ temp_dir::temp_dir(const std::string & base_name) temp_dir::~temp_dir() { if (!do_keep_all && !try_rmdir_recursive(name_)) - std::cerr << "Warning: failed to remove temporary directory " + std::cerr << "WARN: Failed to remove temporary directory " << name_ << "\n"; } diff --git a/videolink.cpp b/videolink.cpp index f20f71b..b4210a1 100644 --- a/videolink.cpp +++ b/videolink.cpp @@ -343,7 +343,7 @@ namespace { assert(!page_queue_.empty()); const std::string & uri = page_queue_.front(); - std::cout << "loading " << uri << std::endl; + std::cout << "INFO: Loading " << uri << std::endl; browser_widget_.load_uri(uri); } @@ -441,20 +441,18 @@ namespace } catch (std::exception & e) { - std::cerr << "Fatal error"; if (!page_queue_.empty()) - std::cerr << " while processing <" << page_queue_.front() - << ">"; - std::cerr << ": " << e.what() << "\n"; + std::cerr << "ERROR: While processing <" + << page_queue_.front() << ">:\n"; + std::cerr << "ERROR: " << e.what() << "\n"; Gtk::Main::quit(); } catch (Glib::Exception & e) { - std::cerr << "Fatal error"; if (!page_queue_.empty()) - std::cerr << " while processing <" << page_queue_.front() - << ">"; - std::cerr << ": " << e.what() << "\n"; + std::cerr << "ERROR: While processing <" + << page_queue_.front() << ">:\n"; + std::cerr << "ERROR: " << e.what() << "\n"; Gtk::Main::quit(); } } @@ -619,7 +617,7 @@ namespace if (state->link_rect.empty()) { - std::cerr << "Ignoring invisible link to " + std::cerr << "WARN: Ignoring invisible link to " << uri_and_fragment << "\n"; continue; } @@ -635,8 +633,8 @@ namespace check(uri_iface->SchemeIs("file", &is_file)); if (!is_file) { - std::cerr << "Links to video must use the file:" - << " scheme\n"; + std::cerr << "WARN: Ignoring non-file link to " + << uri_and_fragment << "\n"; continue; } target = add_title(uri, format); @@ -797,7 +795,7 @@ namespace void fatal_error(const std::string & message) { - std::cerr << "Fatal error: " << message << "\n"; + std::cerr << "ERROR: " << message << "\n"; Gtk::Main::quit(); } @@ -981,7 +979,7 @@ int main(int argc, char ** argv) } catch (std::exception & e) { - std::cerr << "Fatal error: " << e.what() << "\n"; + std::cerr << "ERROR: " << e.what() << "\n"; return EXIT_FAILURE; } }