remove some debugging statements
[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 StackTrace::Auto /;
9 use Throwable::X -all;
10
11 sub _stringify {
12         my $self = shift;
13         return "Error: " . $self->ident . " // " . $self->message
14                 . "\n" . $self->stack_trace->as_string;
15 }
16
17 no Moose;
18 __PACKAGE__->meta->make_immutable( inline_constructor => 0 );
19
20 =head1 NAME
21
22 Text::Tradition::Error - throwable error class for Tradition package
23
24 =head1 DESCRIPTION
25
26 A basic exception class to throw around, as it were.
27
28 =head1 LICENSE
29
30 This package is free software and is provided "as is" without express
31 or implied warranty.  You can redistribute it and/or modify it under
32 the same terms as Perl itself.
33
34 =head1 AUTHOR
35
36 Tara L Andrews E<lt>aurum@cpan.orgE<gt>