summaryrefslogtreecommitdiff
path: root/lib/Moose/Exception/NoCasesMatched.pm
blob: 33672a07973f81d4c1944d2196ad4b81e7a8949a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package Moose::Exception::NoCasesMatched;
our $VERSION = '2.1405';

use Moose;
extends 'Moose::Exception';

has 'to_match' => (
    is       => 'ro',
    isa      => 'Any',
    required => 1
);

has 'cases_to_be_matched' => (
    is       => 'ro',
    isa      => 'ArrayRef',
    required => 1
);

sub _build_message {
    my $self = shift;
    my $to_match = $self->to_match;

    return "No cases matched for $to_match";
}

1;