[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Debconf-video] [patch] Improve dvswitch error handling and package README



I just tested dvswitch, and discovered a minor problem.  When running
it, it reported a non-informative message and aborted:

  % src/.objs/dvswitch -h localhost -p 12345
  terminate called after throwing an instance of 'Glib::FileError'
  Aborted
  %

I tracked this down to the lack of catch statement for the
Glib::Exception class of exception.  At the end is a patch changing
this to report this message instead:


  % src/.objs/dvswitch -h localhost -p 12345
  ERROR: Failed to open file '/usr/share/dvswitch/video-source.png':
    No such file or directory
  %

The reason I got this error is that I have not installed the Debian
packages, just trying to run the program from the source directory.  I
realize that it isn't written to work that way.

While trying to report this issue, I discovered that the README is
missing information on where to find the latest source and where to
report bugs and patches.  I guessed on a few settings, and include a
patch to add such information to the README.

Index: doc/README
===================================================================
--- doc/README  (revision 153)
+++ doc/README  (working copy)
@@ -138,3 +138,17 @@

 dvsink-command provides a continuous stream which is not affected by
 the recording commands.
+
+Latest source version
+---------------------
+
+The project home page is at
+<URL:http://alioth.debian.org/projects/dvswitch/>, and source tarballs
+are available from there.  The latest source is availble in the public
+subversion repository svn://svn.debian.org/dvswitch/trunk .
+
+Where to report bugs and patches
+--------------------------------
+
+Report bugs to the debconf-video mailing list,
+debconf-video@lists.debconf.org.
Index: src/dvswitch.cpp
===================================================================
--- src/dvswitch.cpp    (revision 153)
+++ src/dvswitch.cpp    (working copy)
@@ -113,4 +113,9 @@
        std::cerr << "ERROR: " << e.what() << "\n";
        return EXIT_FAILURE;
     }
+    catch (Glib::Exception & e)
+    {
+       std::cerr << "ERROR: " << e.what() << "\n";
+       return EXIT_FAILURE;
+    }
 }

Happy hacking,
-- 
Petter Reinholdtsen

Reply to: