| 1 | package WWW::Crawl4AI::Error; | ||
| 2 | # ABSTRACT: structured error class for WWW::Crawl4AI | ||
| 3 | 12 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | use overload | ||
| 5 | 0 | ▶ | '""' => sub { $_[0]->message }, |
|
Subroutine
BEGIN: called CC=1 SCAR=0.1
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 6 | 4 | ▶ | bool => sub { 1 }, |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 7 | 12 | fallback => 1; | |
| 8 | |||
| 9 | 12 | our $VERSION = '0.001'; | |
| 10 | |||
| 11 | |||
| 12 | 12 | has type => ( is => 'ro', required => 1 ); | |
| 13 | |||
| 14 | |||
| 15 | 12 | has message => ( is => 'ro', required => 1 ); | |
| 16 | |||
| 17 | |||
| 18 | 12 | has response => ( is => 'ro' ); | |
| 19 | |||
| 20 | |||
| 21 | 12 | has data => ( is => 'ro' ); | |
| 22 | |||
| 23 | |||
| 24 | 12 | has status_code => ( is => 'ro' ); | |
| 25 | |||
| 26 | |||
| 27 | 12 | has url => ( is => 'ro' ); | |
| 28 | |||
| 29 | |||
| 30 | 12 | has backend => ( is => 'ro' ); | |
| 31 | |||
| 32 | |||
| 33 | 12 | has attempt => ( is => 'ro' ); | |
| 34 | |||
| 35 | |||
| 36 | 0 | ▶ | sub is_transport { $_[0]->type eq 'transport' } |
|
Subroutine
is_transport: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 37 | 0 | ▶ | sub is_api { $_[0]->type eq 'api' } |
|
Subroutine
is_api: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 38 | 0 | ▶ | sub is_job { $_[0]->type eq 'job' } |
|
Subroutine
is_job: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 39 | 1 | ▶ | sub is_content { $_[0]->type eq 'content' } |
|
Subroutine
is_content: called CC=1 SCAR=0.0
Pod
documented
| |||
| 40 | |||
| 41 | |||
| 42 | 12 | 1; | |
| 43 | |||
| 44 | __END__ | ||