Permalink
Browse files

croak rather than die on invalid region

  • Loading branch information...
1 parent d058c08 commit 830c0ad1d65e8cefb051150c23b9b824dd165792 @oalders committed Nov 8, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Business/CA/GST.pm
@@ -4,6 +4,7 @@ use warnings;
package Business::CA::GST;
use Moose;
+use Carp qw( croak );
my %TAX = (
AB => { rate => 0.05, type => 'GST' },
@@ -44,7 +45,7 @@ sub _validate_region {
my $self = shift;
if ( !exists $TAX{ $self->buyer_region } ) {
- die "invalid buyer_region: " . $self->buyer_region;
+ croak "invalid buyer_region: " . $self->buyer_region;
}
return 1;

0 comments on commit 830c0ad

Please sign in to comment.