NAME

Bio::CIPRES::Error - A simple error class for the CIPRES API

SYNOPSIS

use Bio::CIPRES:Error qw/:constants/;

eval {
    $job->download('name' => 'foobar');
}
if ($@) {
    warn "Authentication error" if ($@ == ERR_AUTHENTICATION);
    # or just use the default stringification
    warn $@;
}

DESCRIPTION

Bio::CIPRES::Error is a simple error class for the CIPRES API. Its purpose is to parse the XML error report returned by CIPRES and provide an object that can be used in different contexts. In string context it returns a textual summary of the error, and in numeric context it returns the error code.

This class does not contain any methods (including the constructor) intended to be called by the end user. Its functionality is encoded in its overload behavior as described above.

EXPORTS

The following error codes are available under the ':constants' tag:

  • ERR_AUTHORIZATION

  • ERR_AUTHENTICATION

  • ERR_NOT_FOUND

  • ERR_FORM_VALIDATION

  • ERR_USER_MISMATCH

  • ERR_BAD_REQUEST

  • ERR_GENERIC_SVC_ERR

  • ERR_GENERIC_COMM_ERR

  • ERR_BAD_INVOCATION

  • ERR_USAGE_LIMIT

  • ERR_DISABLED_RESOURCE

METHODS

None

CAVEATS AND BUGS

Please reports bugs to the author.

AUTHOR

Jeremy Volkening <jdv@base2bio.com>

COPYRIGHT AND LICENSE

Copyright 2016 Jeremy Volkening

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.