Bug 4295 - Add exceptions as error handling mechanism
: Add exceptions as error handling mechanism
Status: CLOSED INVALID
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 7.0
: All All
: P2 normal (vote)
: ---
Assigned To: Chris Owens
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-04 16:02 UTC by Dan Sully
Modified: 2008-12-18 11:12 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Sully 2006-10-04 16:02:17 UTC
Use Exception::Class for error handling.

* Be able to propagate an error message to the user via either the playerUI or the webUI (javascript?)

Exceptions will be defined as something like this:

package Slim::Utils::Exceptions;

# $Id$

use strict;
use base qw(Exporter);
use Exception::Class::TryCatch;

# Let the callers import these automatically.
our @EXPORT = qw(try catch);

use Exception::Class (

        'Slim::Exceptions::Base' => {
                description => 'An unknown exception in SlimServer has occured.'
        },

        'Slim::Exceptions::Undef' => {
                description => 'An undef value was passed in!'
        },
Comment 1 Chris Owens 2007-10-22 10:27:09 UTC
Dean notes Alan should keep this in mind during refactoring.
Comment 2 Chris Owens 2008-03-07 09:03:56 UTC
This bug is being closed since it was resolved for a version which is now released!  Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html

If you are still seeing this bug, please re-open it and we will consider it for a future release.