14bfa79a16841639c3b2881b1b6d80f2c83ad9c5
[scpubgit/stemmatology.git] / lib / Text / Tradition / Error.pm
1 package Text::Tradition::Error;
2
3 use strict;
4 use warnings;
5 use Moose;
6 use overload '""' => \&_stringify, 'fallback' => 1;
7
8 with qw/ Throwable::X /;
9 use Throwable::X -all;
10
11 sub _stringify {
12         my $self = shift;
13         return "Error: " . $self->ident . " // " . $self->message;
14 }
15
16 no Moose;
17 __PACKAGE__->meta->make_immutable;
18
19 =head1 NAME
20
21 Text::Tradition::Error - throwable error class for CollateX package
22
23 =head1 DESCRIPTION
24
25 A basic exception class to throw around, as it were.
26
27 =cut
28
29 =head1 AUTHOR
30
31 Tara L Andrews E<lt>aurum@cpan.orgE<gt>