]> git.decadent.org.uk Git - videolink.git/blobdiff - videolink.cpp
Changed informational, warning and error messages to use standard prefixes.
[videolink.git] / videolink.cpp
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;
     }
 }