0ad9513584e23d67397a05595d0f31b3ae3241dd
[p5sagit/Devel-REPL.git] / lib / Devel / REPL / Error.pm
1 package Devel::REPL::Error;
2
3 our $VERSION = '1.003027';
4
5 use Moose;
6 use namespace::autoclean;
7
8 # FIXME get nothingmuch to refactor and release his useful error object
9
10 has type => (
11   isa => "Str",
12   is  => "ro",
13   required => 1,
14 );
15
16 has message => (
17   isa => "Str|Object",
18   is  => "ro",
19   required => 1,
20 );
21
22 sub stringify {
23   my $self = shift;
24
25   sprintf "%s: %s", $self->type, $self->message;
26 }
27 __PACKAGE__
28
29 __END__