]> git.decadent.org.uk Git - videolink.git/commitdiff
Changed informational, warning and error messages to use standard prefixes.
authorBen Hutchings <ben@decadent.org.uk>
Sat, 7 Jul 2007 12:20:36 +0000 (12:20 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 2 Nov 2008 23:58:14 +0000 (23:58 +0000)
generate_dvd.cpp
temp_file.cpp
videolink.cpp

index d695c8e2556b2fd03807322eff07d4669997dbb3..45e9ca6d8a3f2d35583c88b763f26785baf3a6d1 100644 (file)
@@ -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<std::string>(
index 323b35896217456196446bcc4037a650719b17c7..e1c139e12d3e510c998dd01cefd2ab2578b4bbc7 100644 (file)
@@ -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";
 }
index f20f71bf4cdba0b49c5299d35a07fde8f291c5bc..b4210a181dbbac5c8c0cf9f2ce95d079ee2becb9 100644 (file)
@@ -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;
     }
 }