App-Docker-Client

 view release on metacpan or  search on metacpan

lib/App/Docker/Client/Exception.pm  view on Meta::CPAN

package App::Docker::Client::Exception;

use 5.16.0;
use strict;
use warnings;

=head1 NAME

App::Docker::Client::Exception - Exception class for App::Docker::Client.

=head1 VERSION

Version 0.010200

=cut

our $VERSION = '0.010200';

=head2 new

Constructor

=cut

sub new {
    my $class = shift;
    my $self  = {@_};
    bless $self, $class;
    return $self;
}

=head2 is_not_fround

=cut

sub is_not_fround   { $_[0]->{code} == 404 ? 1                           : 0 }

=head2 is_confict

=cut

sub is_confict      { $_[0]->{code} == 409 ? 1                           : 0 }

=head2 code

=cut

sub code            { $_[0]->{code} }

=head2 content

=cut

sub content         { $_[0]->{content} }

=head2 content_message

=cut

sub content_message { $_[0]->{content}     ? $_[0]->{content}->{message} : undef }

=head2 message

=cut

sub message         { $_[0]->{message} }

1;    # End of App::Docker::Client::Exception

__END__

=head1 AUTHOR

Mario Zieschang, C<< <mziescha at cpan.org> >>

=head1 BUGS

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


=head1 SUPPORT

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

    perldoc App::Docker::Client::Exception
You can also look for information at:

=over 4

=item * RT: CPAN's request tracker (report bugs here)

L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=App-Docker-Client>

=item * AnnoCPAN: Annotated CPAN documentation



( run in 1.520 second using v1.01-cache-2.11-cpan-39bf76dae61 )