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