| 1 | package Net::Amazon::S3::Error::Handler::X; | ||||||||||
| 2 | 1 | $Net::Amazon::S3::Error::Handler::X::VERSION = '0.992'; | |||||||||
| 3 | # ABSTRACT: Throw error specific exception | ||||||||||
| 4 | |||||||||||
| 5 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | extends 'Net::Amazon::S3::Error::Handler'; | |||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | use Net::Amazon::S3::X; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 8 | ▶ | override handle_error => sub { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.0
| |||||||||||
| 12 | 8 | my ($self, $response, $request) = @_; | |||||||||
| 13 | |||||||||||
| 14 | 8 | ▶ | return 1 unless $response->is_error; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | |||||||||||
| 16 | 8 | my $exception = Net::Amazon::S3::X->build ( | |||||||||
| 17 | $response->error_code, | ||||||||||
| 18 | request => $request, | ||||||||||
| 19 | response => $response, | ||||||||||
| 20 | ); | ||||||||||
| 21 | |||||||||||
| 22 | 8 | die $exception; | |||||||||
| 23 | 1 | }; | |||||||||
| 24 | |||||||||||
| 25 | 1 | 1; | |||||||||
| 26 | |||||||||||
| 27 | __END__ | ||||||||||