Data::Record::Serialize::Error - Error objects
version 0.17
use Data::Record::Serialize::Error -all; use Data::Record::Serialize::Error { errors => [ qw( param connect schema create insert )] }, -all;
Data::Record::Serialize
Most errors result in exception objects being thrown, typically in the Data::Record::Serialize::Error hierarchy. The exception objects will stringify to an appropriate error message. Additional payload data may be returned as well (see the documentation for the individual modules which throw exceptions). The objects are derived from failures and have the attributes documented in "Attributes" in failures.
Data::Record::Serialize::Error
This module organizes Data::Record::Serialize errors based upon custom::failures. It uses Exporter::Shiny. The global option nnerrors may be used to construct a set of error classes. errors is passed an array of error names; if they begin with :: they are relative to Data::Record::Serialize::Error, otherwise they are relative to the Error sub-hierarchy under the calling package.
errors
::
Error
For example,
package Data::Record::Serialize::Bar; use Data::Record::Serialize::Error { errors => [ '::foo', 'foo' ] };
will construct error classes Data::Record::Serialize::Error::foo and Data::Record::Serialize::Bar::Error::foo;
Data::Record::Serialize::Error::foo
Data::Record::Serialize::Bar::Error::foo
Names (passed either during module import or to the "error" subroutine) are converted to fully qualified class names via the following:
if a name begins with :: it is relative to Data::Record::Serialize::Error
otherwise it is relative to the Error sub-hierarchy under the calling package.
For example, in
package Data::Record::Serialize::Bar; use Data::Record::Serialize::Error { errors => [ '::foo', 'foo' ] }; error( '::foo', @stuff ); error( 'foo', @stuff );
::foo will be converted to Data::Record::Serialize::Error::foo and foo to Data::Record::Serialize::Bar::Error::foo.
::foo
foo
See "Attributes" in failures.
error( $error_class, @_ );
Throw an error. $error_class is converted to a fully qualified class name; see "Error Class Names". The remaining parameters are passed directly to the failures throw method (see "Throwing failures" in failures).
$error_class
You can make new bug reports, and view existing ones, through the web interface at https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Record-Serialize.
Please see those modules/websites for more information related to this module.
Diab Jerius <djerius@cpan.org>
This software is Copyright (c) 2017 by Smithsonian Astrophysical Observatory.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
To install Data::Record::Serialize, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Record::Serialize
CPAN shell
perl -MCPAN -e shell install Data::Record::Serialize
For more information on module installation, please visit the detailed CPAN module installation guide.