Nicholas Perez > ShardedKV > ShardedKV::Error

Download:
ShardedKV-0.17.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.17   Source   Latest Release: ShardedKV-0.19

NAME ^

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

VERSION ^

version 0.17

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 ATTRIBUTES ^

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.

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 ^

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.

syntax highlighting: