Mac::Apps::Seasonality::LoadICAOHistoryExceptions - Exceptions thrown for


Mac-Apps-Seasonality-LoadICAOHistory documentation Contained in the Mac-Apps-Seasonality-LoadICAOHistory distribution.

Index


Code Index:

NAME

Top

Mac::Apps::Seasonality::LoadICAOHistoryExceptions - Exceptions thrown for various problems when dealing with ICAO history.

VERSION

Top

This document describes Mac::Apps::Seasonality::LoadICAOHistoryExceptions version 0.0.6.

SYNOPSIS

Top

 use Mac::Apps::Seasonality::LoadICAOHistoryExceptions;

 eval { ... };

 my $exception;
 if ($exception = Mac::Apps::Seasonality::InvalidDatumException->caught()) {
    ... $exception->column_name ...
 } # end if




DESCRIPTION

Top

This module contains all the exception classes used to indicate problems with processing ICAO data.

INTERFACE

Top

The exception hierarchy.

Mac::Apps::Seasonality::LoadICAOHistoryException

Base exception class with no behavior beyond that supplied by Exception::Class.

Mac::Apps::Seasonality::InvalidParameterException

A subroutine was invoked with an invalid parameter.

Mac::Apps::Seasonality::ValidationException

A problem with input ICAO history data.

Attributes:

input_line_number: The line number that the problematic data was found on.>

Mac::Apps::Seasonality::CSVParseException

A problem with a line of text that is supposed to be in CSV format but actually isn't.

Mac::Apps::Seasonality::DataException

A problem with the input (post parsing from CSV) that is supposed to represent one data point.

Attributes:

input_data_ref: A reference to an array containing the values for one data point, in the order of the columns in the icao_history database table.

Mac::Apps::Seasonality::InvalidDataSizeException

An array that is supposed to represent one data point has too much or too little data in it.

Attributes:

expected_number_of_elements: How many items were there supposed to be.

actual_number_of_elements: How many items there were.

Mac::Apps::Seasonality::InvalidDatumException

An individual data item is not valid for the aspect of a data point it represents.

Attributes:

column_name: The name of the column in the icao_history database table that the datum is intended for.

column_number: The position the invalid datum is in in the input.

invalid_value: The actual value in question.

DIAGNOSTICS

Top

This module is nothing but diagnostics.

CONFIGURATION AND ENVIRONMENT

Top

Mac::Apps::Seasonality::LoadICAOHistoryExceptions requires no configuration files or environment variables.

DEPENDENCIES

Top

Exception::Class

INCOMPATIBILITIES

Top

None reported.

BUGS AND LIMITATIONS

Top

That this module exists at all because data can't be magically be corrected without the assistance of a human being.

Please report any bugs or feature requests to bug-mac-apps-seasonality-loadicaohistory@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR

Top

Elliot Shank perl@galumph.com

LICENSE AND COPYRIGHT

Top

DISCLAIMER OF WARRANTY

Top

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.


Mac-Apps-Seasonality-LoadICAOHistory documentation Contained in the Mac-Apps-Seasonality-LoadICAOHistory distribution.

package Mac::Apps::Seasonality::LoadICAOHistoryExceptions;

use utf8;
use 5.008006;
use strict;
use warnings;
use Carp;

use version; our $VERSION = qv('v0.0.6');

## no critic (RestrictLongStrings)
use Exception::Class (
    'Mac::Apps::Seasonality::LoadICAOHistoryException' => {
        description => 'A problem with dealing with ICAO history.',
    },

    'Mac::Apps::Seasonality::InvalidParameterException' => {
        isa         => 'Mac::Apps::Seasonality::LoadICAOHistoryException',
        description => 'A subroutine was called with an invalide parameter value.',
    },

    'Mac::Apps::Seasonality::ValidationException' => {
        isa         => 'Mac::Apps::Seasonality::LoadICAOHistoryException',
        description => 'A problem with input data.',
        fields      => [ qw{ input_line_number } ],
    },

    'Mac::Apps::Seasonality::CSVParseException' => {
        isa         => 'Mac::Apps::Seasonality::ValidationException',
        description => 'A problem with a line of text that is supposed to be in CSV format.',
        fields      => [ qw{ invalid_input } ],
    },

    'Mac::Apps::Seasonality::DataException' => {
        isa         => 'Mac::Apps::Seasonality::ValidationException',
        description => 'A problem with the content of input data.',
        fields      => [ qw{ input_data_ref } ],
    },
    'Mac::Apps::Seasonality::InvalidDataSizeException' => {
        isa         => 'Mac::Apps::Seasonality::DataException',
        description => 'An array that is supposed to represent one data point has too much or too little data in it.',
        fields      => [ qw{ expected_number_of_elements actual_number_of_elements } ],
    },
    'Mac::Apps::Seasonality::InvalidDatumException' => {
        isa         => 'Mac::Apps::Seasonality::DataException',
        description => 'An individual data item that is not valid for the aspect of a data point it represents.',
        fields      => [ qw{ column_name column_number invalid_value } ],
    },
);
## use critic

1; # Magic true value required at end of module

__END__

# setup vim: set filetype=perl tabstop=4 softtabstop=4 expandtab :
# setup vim: set shiftwidth=4 shiftround textwidth=78 nowrap autoindent :
# setup vim: set foldmethod=indent foldlevel=0 :