use croak, not carp
This commit is contained in:
parent
fc89cb74d8
commit
fe516b6b32
@ -45,13 +45,13 @@ sub add_type($self,$type,$definition={}) {
|
|||||||
|
|
||||||
=head2 type($type)
|
=head2 type($type)
|
||||||
|
|
||||||
Returns the type's C<Dancer2::Plugin::JsonApi::Registry::Type>. Throws an
|
Returns the type's C<Dancer2::Plugin::JsonApi::Registry::Schema>. Throws an
|
||||||
error if the type does not exist.
|
error if the type does not exist.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub type($self,$type) {
|
sub type($self,$type) {
|
||||||
return $self->types->{$type} || carp "type '$type' not found\n";
|
return $self->types->{$type} || croak "type '$type' not found";
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user