Skip to content

Commit 37688b4

Browse files
authored
Merge pull request #15 from Grinnz/patch-1
Throw an exception on unknown api parameter value
2 parents d65b83c + acccd68 commit 37688b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Protocol/Redis.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ sub new {
1414

1515
my $self = {@_};
1616

17-
return unless $self->{api} == '1';
17+
Carp::croak(qq/Unknown Protocol::Redis API version $self->{api}/) unless $self->{api} == '1';
1818

1919
bless $self, $class;
2020

0 commit comments

Comments
 (0)