SimpleDB::Class::Exception - Exceptions thrown by SimpleDB::Class.


SimpleDB-Class documentation Contained in the SimpleDB-Class distribution.

Index


Code Index:

NAME

Top

SimpleDB::Class::Exception - Exceptions thrown by SimpleDB::Class.

VERSION

Top

version 1.0502

DESCRIPTION

Top

A submclass of Exception::Class that defines expcetions to be thrown through-out SimpleDB::Class ojbects.

EXCEPTIONS

Top

The following exceptions are available from this class.

SimpleDB::Class::Exception

A general error. Isa Exception::Class.

SimpleDB::Class::Exception::ObjectNotFound

Thrown when a request object is not found.

id

The id of the requested object.

SimpleDB::Class::Exception::InvalidParam

Thrown when a parameter isn't passed when it should have been, or if it's left undefined. Isa SimpleDB::Class::Exception::ObjectNotFound.

SimpleDB::Class::Exception::InvalidObject

Thrown when a request object is found, but is corrupt. Isa SimpleDB::Class::Exception::ObjectNotFound.

SimpleDB::Class::Exception::Connection

Thrown when exceptions occur connecting to the SimpleDB database at Amazon, or the memcached server. Isa SimpleDB::Class::Exception.

status_code

The HTTP status code returned.

LEGAL

Top


SimpleDB-Class documentation Contained in the SimpleDB-Class distribution.
package SimpleDB::Class::Exception;
BEGIN {
  $SimpleDB::Class::Exception::VERSION = '1.0502';
}

use strict;
use Exception::Class (

    'SimpleDB::Class::Exception' => {
        description     => "A general error occured.",
        },
    'SimpleDB::Class::Exception::InvalidParam' => {
        isa             => 'SimpleDB::Class::Exception',
        description     => 'This method should be overridden by subclasses.',
        fields          => ['name', 'value'],
        },
    'SimpleDB::Class::Exception::ObjectNotFound' => {
        isa             => 'SimpleDB::Class::Exception',
        description     => "The object you were trying to retrieve does not exist.",
        fields          => ['id'],
        },
    'SimpleDB::Class::Exception::InvalidObject' => {
        isa             => 'SimpleDB::Class::Exception::ObjectNotFound',
        description     => "The object you were trying to retrieve does not exist.",
        },
    'SimpleDB::Class::Exception::Connection' => {
        isa             => 'SimpleDB::Class::Exception',
        description     => "There was a problem establishing a connection.",
        fields          => ['status_code'],
        },

);

1;