package Data::TagsAndRanges::Exceptions;
package Data::TagsAndRanges::Exceptions::NotFound;{
use Moose;
extends 'Throwable::Error';
has value => (
is => 'ro',
required => 1,
);
sub as_string {
my ($self) = @_;
my $str = $self->message . $self->value;
$str .= "\n\n" . $self->stack_trace->as_string;
return $str;
}
}
package Data::TagsAndRanges::Exceptions::TagNotFound;{
use Moose;
extends 'Data::TagsAndRanges::Exceptions::NotFound';
has '+message' => (
default => 'tag not found: ',
);
}
package Data::TagsAndRanges::Exceptions::RangeNotFound;{
use Moose;
extends 'Data::TagsAndRanges::Exceptions::NotFound';
has '+message' => (
default => 'no range found for value ',
);
}
1;