| 1 | package Business::CPI::Role::Exception; | ||
| 2 | # ABSTRACT: Exceptions from the gateway | ||
| 3 | 1 | ▶ | use Moo::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use Types::Standard qw/Int Str HashRef/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use Business::CPI::Util::Types qw/ExceptionType/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | with 'Throwable'; | |
| 7 | |||
| 8 | 1 | our $VERSION = '0.924'; # VERSION | |
| 9 | |||
| 10 | 1 | has type => ( | |
| 11 | coerce => ExceptionType->coercion, | ||
| 12 | isa => ExceptionType, | ||
| 13 | is => 'ro', | ||
| 14 | required => 1, | ||
| 15 | ); | ||
| 16 | |||
| 17 | 1 | has message => ( | |
| 18 | isa => Str, | ||
| 19 | is => 'ro', | ||
| 20 | required => 1, | ||
| 21 | ); | ||
| 22 | |||
| 23 | 1 | has gateway_data => ( | |
| 24 | isa => HashRef, | ||
| 25 | is => 'ro', | ||
| 26 | required => 1, | ||
| 27 | ); | ||
| 28 | |||
| 29 | 1 | 1; | |
| 30 | |||
| 31 | __END__ | ||