On Sun, 2009-03-01 at 14:17 -0500, "Andrés G. Aragoneses" wrote:
> blorentz svn gnome org wrote:
> > Author: blorentz
> > Date: Sun Mar 1 18:20:38 2009
> > New Revision: 5089
> > URL: http://svn.gnome.org/viewvc/banshee?rev=5089&view=rev
> >
> > Log:
> > 2009-03-01 Bertrand Lorentz <bertrand dot lorentz at gmail dot com>
> >
> > * src/Core/Banshee.Services/Banshee.Playlists.Formats/XspfPlaylistFormat.cs:
> > Do not throw an exception when trying to sniff an invalid file.
> >
> >
> >
> > Modified:
> > trunk/banshee/ChangeLog
> > trunk/banshee/src/Core/Banshee.Services/Banshee.Playlists.Formats/XspfPlaylistFormat.cs
> >
> > Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Playlists.Formats/XspfPlaylistFormat.cs
> > ==============================================================================
> > --- trunk/banshee/src/Core/Banshee.Services/Banshee.Playlists.Formats/XspfPlaylistFormat.cs (original)
> > +++ trunk/banshee/src/Core/Banshee.Services/Banshee.Playlists.Formats/XspfPlaylistFormat.cs Sun Mar 1 18:20:38 2009
> > @@ -48,7 +48,11 @@
> >
> > public static bool MagicHandler (StreamReader stream)
> > {
> > - return Xspf.Playlist.Sniff (stream);
> > + try {
> > + return Xspf.Playlist.Sniff (stream);
> > + } catch {
> > + return false;
> > + }
> > }
> >
> > public XspfPlaylistFormat ()
>
> Shouldn't we log all exceptions? Generic catches are often pretty hard
> to handle when debugging.
This method is called when banshee tries to determine the type of a
stream. So exceptions are expected to happen in a lot of cases : if the
stream is not proper XML, a m3u, a mp3, etc.
Logging this would be too verbose, imho.
--
Bertrand Lorentz <bertrand lorentz gmail com>
> http://flickr.com/photos/bl8/ <
Attachment:
signature.asc
Description: This is a digitally signed message part