The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CloudFlare::Client::Exception::Upstream - Upstream CloudFlare API Exception

VERSION

version 0.03_7

SYNOPSIS

Exception class that propagates errors from the CloudFlare API

    use CloudFlare::Client::Exception::Upstream;

    CloudFlare::Client::Exception::Upstream::->throw(
        message   => 'Bad things occured',
        errorCode => 'E_MAXAPI'
    );

    my $e = CloudFlare::Client::Exception::Upstream::->new(
        message   => 'Bad things happened',
        errorcode => 'E_MAXAPI'
    );
    $e->throw;

ATTRIBUTES

message

The error message thrown upstream, readonly.

errorCode

The error code thrown upstream, readonly. Valid values are undef, E_UNAUTH, E_INVLDINPUT or E_MAXAPI.

METHODS

throw

On the class, throw a new exception

    CloudFlare::Client::Exception::Upstream::->throw(
        message   => 'Bad things occured',
        errorCode => 'E_MAXAPI'
    );
    ...

On an instance, throw that exception

    $e->throw;

new

Construct a new exception

    my $e = CloudFlare::Client::Exception::Upstream::->new(
        message   => 'Bad things happened',
        errorcode => 'E_MAXAPI'
    );

INHERITANCE

See Throwable::Error

BUGS

Please report any bugs or feature requests to bug-cloudflare-client at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CloudFlare-Client. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc CloudFlare::Client::Exception::Upstream

You can also look for information at:

AUTHOR

Peter Roberts <me+dev@peter-r.co.uk>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2014 by Peter Roberts.

This is free software, licensed under:

  The MIT (X11) License