Re: [Banshee-List] banshee r5089 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Playlists.Formats



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.

Regards,

	Andrés

-- 



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