| 1 | package Net::Kubernetes::Exception; | ||
| 2 | # ABSTRACT: Base class for all kubernetes exceptions. | ||
| 3 | 4 | $Net::Kubernetes::Exception::VERSION = '0.19'; | |
| 4 | 4 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 4 | extends "Throwable::Error"; | |
| 7 | |||
| 8 | 4 | has code => ( | |
| 9 | is => 'ro', | ||
| 10 | isa => 'Num', | ||
| 11 | required => 0, | ||
| 12 | ); | ||
| 13 | |||
| 14 | 4 | ▶ | use Moose::Util::TypeConstraints; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 0 | ▶ | subtype 'Net::Kubernetes::Exception::ClientException', as 'Net::Kubernetes::Exception', where {! defined $_->code}; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 17 | |||
| 18 | 0 | ▶ | subtype 'Net::Kubernetes::Exception::NotFound', as 'Net::Kubernetes::Exception', where { $_->code == 404 }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 19 | |||
| 20 | 0 | ▶ | subtype 'Net::Kubernetes::Exception::Conflict', as 'Net::Kubernetes::Exception', where { $_->code == 409 }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 21 | |||
| 22 | 0 | ▶ | subtype 'Net::Kubernetes::Exception::BadRequest', as 'Net::Kubernetes::Exception', where { $_->code == 400 }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 23 | |||
| 24 | 4 | ▶ | no Moose::Util::TypeConstraints; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 25 | |||
| 26 | |||
| 27 | package Net::Kunbernetes::Exception::ClientException; | ||
| 28 | # ABSTRACT: Exception class for client side errors | ||
| 29 | 4 | $Net::Kunbernetes::Exception::ClientException::VERSION = '0.19'; | |
| 30 | 4 | require Net::Kubernetes::Exception; | |
| 31 | 4 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 32 | |||
| 33 | 4 | extends 'Net::Kubernetes::Exception'; | |
| 34 | 4 | extends 'Throwable::Error'; | |
| 35 | |||
| 36 | |||
| 37 | package Net::Kunbernetes::Exception::NotFound; | ||
| 38 | # ABSTRACT: Kubernetes Not found exception (code 404) | ||
| 39 | 4 | $Net::Kunbernetes::Exception::NotFound::VERSION = '0.19'; | |
| 40 | 4 | require Net::Kubernetes::Exception; | |
| 41 | 4 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 42 | |||
| 43 | 4 | extends 'Net::Kubernetes::Exception'; | |
| 44 | 4 | extends 'Throwable::Error'; | |
| 45 | |||
| 46 | package Net::Kunbernetes::Exception::Conflict; | ||
| 47 | # ABSTRACT: Kubernetes 'Conflict' exception (code 409) | ||
| 48 | 4 | $Net::Kunbernetes::Exception::Conflict::VERSION = '0.19'; | |
| 49 | 4 | require Net::Kubernetes::Exception; | |
| 50 | 4 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 51 | |||
| 52 | 4 | extends 'Net::Kubernetes::Exception'; | |
| 53 | 4 | extends 'Throwable::Error'; | |
| 54 | |||
| 55 | package Net::Kunbernetes::Exception::BadRequest; | ||
| 56 | # ABSTRACT: Kubernetes 'Bad Request' exception (code 400) | ||
| 57 | 4 | $Net::Kunbernetes::Exception::BadRequest::VERSION = '0.19'; | |
| 58 | 4 | require Net::Kubernetes::Exception; | |
| 59 | 4 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 60 | |||
| 61 | 4 | extends 'Net::Kubernetes::Exception'; | |
| 62 | 4 | extends 'Throwable::Error'; | |
| 63 | |||
| 64 | 4 | return 42; | |
| 65 | |||
| 66 | __END__ | ||
| 67 | |||
| 68 | =pod | ||
| 69 | |||
| 70 | =encoding UTF-8 | ||
| 71 | |||
| 72 | =head1 NAME | ||
| 73 | |||
| 74 | Net::Kubernetes::Exception - Base class for all kubernetes exceptions. | ||
| 75 | |||
| 76 | =head1 VERSION | ||
| 77 | |||
| 78 | version 0.19 | ||
| 79 | |||
| 80 | =head1 AUTHOR | ||
| 81 | |||
| 82 | Dave Mueller <dave@perljedi.com> | ||
| 83 | |||
| 84 | =head1 COPYRIGHT AND LICENSE | ||
| 85 | |||
| 86 | This software is Copyright (c) 2015 by Dave Mueller. | ||
| 87 | |||
| 88 | This is free software, licensed under: | ||
| 89 | |||
| 90 | The MIT (X11) License | ||
| 91 | |||
| 92 | =head1 SEE ALSO | ||
| 93 | |||
| 94 | Please see those modules/websites for more information related to this module. | ||
| 95 | |||
| 96 | =over 4 | ||
| 97 | |||
| 98 | =item * | ||
| 99 | |||
| 100 | L<Net::Kubernetes|Net::Kubernetes> | ||
| 101 | |||
| 102 | =back | ||
| 103 | |||
| 104 | =cut | ||