Commit | Line | Data |
---|---|---|
19ba909c | 1 | package Devel::REPL::Error; |
2 | use Moose; | |
3 | ||
4 | # FIXME get nothingmuch to refactor and release his useful error object | |
5 | ||
6 | has type => ( | |
7 | isa => "Str", | |
8 | is => "ro", | |
9 | required => 1, | |
10 | ); | |
11 | ||
12 | has message => ( | |
462bad8f | 13 | isa => "Str|Object", |
19ba909c | 14 | is => "ro", |
15 | required => 1, | |
16 | ); | |
17 | ||
18 | sub stringify { | |
19 | my $self = shift; | |
20 | ||
21 | sprintf "%s: %s", $self->type, $self->message; | |
22 | } | |
23 | __PACKAGE__ | |
24 | ||
25 | __END__ |