]> 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 ef30510149905c0ce7a4f277cbbe68a9c57be934..b4210a181dbbac5c8c0cf9f2ce95d079ee2becb9 100644 (file)
@@ -121,6 +121,7 @@ namespace
            {".vob",     video_format_mpeg2_ps},
            {".mpeg",    video_format_mpeg2_ps},
            {".mpeg2",   video_format_mpeg2_ps},
+           {".mpg",     video_format_mpeg2_ps},
            {".voblist", video_format_vob_list}
        };
        for (std::size_t i = 0;
@@ -342,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);
     }
@@ -440,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();
            }
        }
@@ -618,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;
                }
@@ -634,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);
@@ -796,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();
 }
 
@@ -980,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;
     }
 }