NAME

ShardedKV::Error - Provides an error class for managing exceptions

VERSION

version 0.14

DESCRIPTION

ShardedKV::Error provides a base error class for exceptions that occur in storage backends. Since ShardedKV abstracts away which storage backend is in use, this class provides a couple of attributes that help identify problem endpoints and storage types. There are three subclasses that also identify what sort of operation failed: ShardedKV::Error::ConnectFail, ShardedKV::Error::ReadFail, ShardedKV::Error::WriteFail.

=public_attribute storage_type

(is: ro, isa: enum(redis, mysql), required)

storage_type allows for consumers of ShardedKV to know what threw the exception without knowing which storage backend was in use. Since we only support two types, it is sufficient to simply have an enum for those two types.

=public_attribute endpoint

(is: ro, isa: Str, required)

endpoint allows for consumers of ShardedKV to know to which component the storage backend was communicating. endpoint maybe whatever identifier the storage backend requires. So please consider this a free-form string and check the documentation for the given storage backend module for what endpoint means.

AUTHORS

  • Steffen Mueller <smueller@cpan.org>

  • Nick Perez <nperez@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Steffen Mueller.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.