proddashboard/lib/errors/Error.pm
2018-11-05 15:38:59 +05:00

24 lines
252 B
Perl

package errors::Error;
use strict;
use warnings;
use Moo;
with 'Throwable';
has 'message' => (
is => 'ro',
required => 1,
);
has 'target' => (
is => 'ro'
);
use overload
'""' => \&to_string;
sub to_string { $_[0]->message; }
1;