refactor GraphML write/parse to use Moose introspection
[scpubgit/stemmatology.git] / lib / Text / Tradition / Error.pm
CommitLineData
861c3e27 1package Text::Tradition::Error;
2
3use strict;
4use warnings;
5use Moose;
6use overload '""' => \&_stringify, 'fallback' => 1;
7
63778331 8with qw/ Throwable::X StackTrace::Auto /;
861c3e27 9use Throwable::X -all;
10
11sub _stringify {
12 my $self = shift;
63778331 13 return "Error: " . $self->ident . " // " . $self->message
14 . "\n" . $self->stack_trace->as_string;
861c3e27 15}
16
17no Moose;
63778331 18__PACKAGE__->meta->make_immutable( inline_constructor => 0 );
861c3e27 19
20=head1 NAME
21
22Text::Tradition::Error - throwable error class for CollateX package
23
24=head1 DESCRIPTION
25
26A basic exception class to throw around, as it were.
27
027d819c 28=head1 LICENSE
29
30This package is free software and is provided "as is" without express
31or implied warranty. You can redistribute it and/or modify it under
32the same terms as Perl itself.
861c3e27 33
34=head1 AUTHOR
35
36Tara L Andrews E<lt>aurum@cpan.orgE<gt>